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

Side by Side Diff: components/offline_pages/core/background/connection_notifier.h

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_OFFLINE_PAGES_BACKGROUND_CONNECTION_NOTIFIER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND____CORE_BACKGROUND_CONNECTION_NOTIFI ER_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_CONNECTION_NOTIFIER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND____CORE_BACKGROUND_CONNECTION_NOTIFI ER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "net/base/network_change_notifier.h" 9 #include "net/base/network_change_notifier.h"
10 10
11 namespace offline_pages { 11 namespace offline_pages {
12 12
13 class ConnectionNotifier 13 class ConnectionNotifier
14 : public net::NetworkChangeNotifier::ConnectionTypeObserver { 14 : public net::NetworkChangeNotifier::ConnectionTypeObserver {
15 public: 15 public:
16 // Callback to call when we become connected. 16 // Callback to call when we become connected.
17 typedef base::Callback<void()> ConnectedCallback; 17 typedef base::Callback<void()> ConnectedCallback;
18 18
19 ConnectionNotifier(const ConnectionNotifier::ConnectedCallback& callback); 19 ConnectionNotifier(const ConnectionNotifier::ConnectedCallback& callback);
20 ~ConnectionNotifier() override; 20 ~ConnectionNotifier() override;
21 21
22 // net::NetworkChangeNotifier::ConnectionTypeObserver implementation. 22 // net::NetworkChangeNotifier::ConnectionTypeObserver implementation.
23 void OnConnectionTypeChanged( 23 void OnConnectionTypeChanged(
24 net::NetworkChangeNotifier::ConnectionType type) override; 24 net::NetworkChangeNotifier::ConnectionType type) override;
25 25
26 private: 26 private:
27 base::Callback<void()> callback_; 27 base::Callback<void()> callback_;
28 28
29 DISALLOW_COPY_AND_ASSIGN(ConnectionNotifier); 29 DISALLOW_COPY_AND_ASSIGN(ConnectionNotifier);
30 }; 30 };
31 31
32 } // namespace offline_pages 32 } // namespace offline_pages
33 33
34 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_CONNECTION_NOTIFIER_H_ 34 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND____CORE_BACKGROUND_CONNECTION_NOT IFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698