Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: content/browser/background_sync/background_sync_network_observer.cc

Issue 1376563003: Revert of [BackgroundSync] Trigger Background Sync events when Chrome is backgrounded on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/background_sync/background_sync_network_observer.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/background_sync/background_sync_network_observer.cc
diff --git a/content/browser/background_sync/background_sync_network_observer.cc b/content/browser/background_sync/background_sync_network_observer.cc
index a08e7d837183f989a37c46a713523ec6d84f1689..1c6f2bd98163864f14e98ed2647fdf00a6550117 100644
--- a/content/browser/background_sync/background_sync_network_observer.cc
+++ b/content/browser/background_sync/background_sync_network_observer.cc
@@ -10,15 +10,6 @@
#include "content/public/browser/browser_thread.h"
namespace content {
-
-// static
-bool BackgroundSyncNetworkObserver::ignore_network_change_notifier_ = false;
-
-// static
-void BackgroundSyncNetworkObserver::SetIgnoreNetworkChangeNotifierForTests(
- bool ignore) {
- ignore_network_change_notifier_ = ignore;
-}
BackgroundSyncNetworkObserver::BackgroundSyncNetworkObserver(
const base::Closure& network_changed_callback)
@@ -56,18 +47,17 @@
return false;
}
+void BackgroundSyncNetworkObserver::NotifyNetworkChanged() {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ network_changed_callback_);
+}
+
void BackgroundSyncNetworkObserver::OnNetworkChanged(
net::NetworkChangeNotifier::ConnectionType connection_type) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- if (ignore_network_change_notifier_)
- return;
- NotifyManagerIfNetworkChanged(connection_type);
-}
-
-void BackgroundSyncNetworkObserver::NotifyManagerIfNetworkChanged(
- net::NetworkChangeNotifier::ConnectionType connection_type) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (connection_type == connection_type_)
return;
@@ -75,11 +65,4 @@
NotifyNetworkChanged();
}
-void BackgroundSyncNetworkObserver::NotifyNetworkChanged() {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
-
- base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
- network_changed_callback_);
-}
-
} // namespace content
« no previous file with comments | « content/browser/background_sync/background_sync_network_observer.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698