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

Side by Side Diff: components/offline_pages/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_CONNECTION_NOTIFIER_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_CONNECTION_NOTIFIER_H_
7
8 #include "base/callback.h"
9 #include "net/base/network_change_notifier.h"
10
11 namespace offline_pages {
12
13 class ConnectionNotifier
14 : public net::NetworkChangeNotifier::ConnectionTypeObserver {
15 public:
16 // Callback to call when we become connected.
17 typedef base::Callback<void()> ConnectedCallback;
18
19 ConnectionNotifier(const ConnectionNotifier::ConnectedCallback& callback);
20 ~ConnectionNotifier() override;
21
22 // net::NetworkChangeNotifier::ConnectionTypeObserver implementation.
23 void OnConnectionTypeChanged(
24 net::NetworkChangeNotifier::ConnectionType type) override;
25
26 private:
27 base::Callback<void()> callback_;
28
29 DISALLOW_COPY_AND_ASSIGN(ConnectionNotifier);
30 };
31
32 } // namespace offline_pages
33
34 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_CONNECTION_NOTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698