From 0cdfc55e7663573a49a5fd600c41c07dc0fd6142 Mon Sep 17 00:00:00 2001 From: Gyuyoung Kim Date: Fri, 13 Nov 2020 12:34:25 +0900 Subject: [PATCH] Remove components-invalidation-impl-fcm_network_handler.cc.patch The patch file can be replace by overriding StartListening() in //brave/chromium_src. Resolves brave/brave-browser#12685. --- .../invalidation/impl/fcm_network_handler.cc | 18 ++++++++++++++++++ .../invalidation/impl/fcm_network_handler.h | 16 ++++++++++++++++ ...alidation-impl-fcm_network_handler.cc.patch | 12 ------------ 3 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 chromium_src/components/invalidation/impl/fcm_network_handler.cc create mode 100644 chromium_src/components/invalidation/impl/fcm_network_handler.h delete mode 100644 patches/components-invalidation-impl-fcm_network_handler.cc.patch diff --git a/chromium_src/components/invalidation/impl/fcm_network_handler.cc b/chromium_src/components/invalidation/impl/fcm_network_handler.cc new file mode 100644 index 000000000000..17fd96143638 --- /dev/null +++ b/chromium_src/components/invalidation/impl/fcm_network_handler.cc @@ -0,0 +1,18 @@ +/* Copyright (c) 2020 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * you can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "components/invalidation/impl/fcm_network_handler.h" + +#define StartListening StartListening_ChromiumImpl +#include "../../../../../components/invalidation/impl/fcm_network_handler.cc" +#undef StartListening + +namespace syncer { + +void FCMNetworkHandler::StartListening() { + return; +} + +} // namespace syncer diff --git a/chromium_src/components/invalidation/impl/fcm_network_handler.h b/chromium_src/components/invalidation/impl/fcm_network_handler.h new file mode 100644 index 000000000000..d3b96e94b99e --- /dev/null +++ b/chromium_src/components/invalidation/impl/fcm_network_handler.h @@ -0,0 +1,16 @@ +/* Copyright (c) 2020 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * you can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_INVALIDATION_IMPL_FCM_NETWORK_HANDLER_H_ +#define BRAVE_CHROMIUM_SRC_COMPONENTS_INVALIDATION_IMPL_FCM_NETWORK_HANDLER_H_ + +#include "components/invalidation/impl/fcm_sync_network_channel.h" + +#define StartListening StartListening_ChromiumImpl(); \ + void StartListening +#include "../../../../../components/invalidation/impl/fcm_network_handler.h" +#undef StartListening + +#endif // BRAVE_CHROMIUM_SRC_COMPONENTS_INVALIDATION_IMPL_FCM_NETWORK_HANDLER_H_ diff --git a/patches/components-invalidation-impl-fcm_network_handler.cc.patch b/patches/components-invalidation-impl-fcm_network_handler.cc.patch deleted file mode 100644 index 05ce785e57e2..000000000000 --- a/patches/components-invalidation-impl-fcm_network_handler.cc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/components/invalidation/impl/fcm_network_handler.cc b/components/invalidation/impl/fcm_network_handler.cc -index a8c688cd80e93ed6d208666deaf926e7132ff1d7..7fb2486207c401d12083a692d7f6e21add6b3525 100644 ---- a/components/invalidation/impl/fcm_network_handler.cc -+++ b/components/invalidation/impl/fcm_network_handler.cc -@@ -182,6 +182,7 @@ std::unique_ptr FCMNetworkHandler::Create( - } - - void FCMNetworkHandler::StartListening() { -+ return; // feature disabled in Brave - if (IsListening()) { - StopListening(); - }