| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_NETWORK_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_NETWORK_OBSERVER_H_ |
| 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_NETWORK_OBSERVER_H_ | 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_NETWORK_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" |
| 9 #include "content/browser/background_sync/background_sync.pb.h" | 10 #include "content/browser/background_sync/background_sync.pb.h" |
| 10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 11 #include "net/base/network_change_notifier.h" | 12 #include "net/base/network_change_notifier.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 | 15 |
| 15 class CONTENT_EXPORT BackgroundSyncNetworkObserver | 16 class CONTENT_EXPORT BackgroundSyncNetworkObserver |
| 16 : public net::NetworkChangeNotifier::NetworkChangeObserver { | 17 : public net::NetworkChangeNotifier::NetworkChangeObserver { |
| 17 public: | 18 public: |
| 18 // Creates a BackgroundSyncNetworkObserver. |network_changed_callback| is | 19 // Creates a BackgroundSyncNetworkObserver. |network_changed_callback| is |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Set true to ignore notifications coming from the NetworkChangeNotifier | 53 // Set true to ignore notifications coming from the NetworkChangeNotifier |
| 53 // (to prevent flakes in tests). | 54 // (to prevent flakes in tests). |
| 54 static bool ignore_network_change_notifier_; | 55 static bool ignore_network_change_notifier_; |
| 55 | 56 |
| 56 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncNetworkObserver); | 57 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncNetworkObserver); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace content | 60 } // namespace content |
| 60 | 61 |
| 61 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_NETWORK_OBSERVER_H_ | 62 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_NETWORK_OBSERVER_H_ |
| OLD | NEW |