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

Side by Side Diff: net/base/logging_network_change_observer.h

Issue 1971853002: Move IOThread::LoggingNetworkChangeObserver to net/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 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 NET_BASE_LOGGING_NETWORK_CHANGE_OBSERVER_H_
6 #define NET_BASE_LOGGING_NETWORK_CHANGE_OBSERVER_H_
7
8 #include "base/macros.h"
9 #include "net/base/network_change_notifier.h"
10
11 namespace net {
12
13 class NetLog;
14
15 // A class that adds NetLog events for network change events coming from the
16 // net::NetworkChangeNotifier.
17 class LoggingNetworkChangeObserver
18 : public NetworkChangeNotifier::IPAddressObserver,
19 public NetworkChangeNotifier::ConnectionTypeObserver,
20 public NetworkChangeNotifier::NetworkChangeObserver {
21 public:
22 // Note: |net_log| must remain valid throughout the lifetime of this
23 // LoggingNetworkChangeObserver.
24 explicit LoggingNetworkChangeObserver(NetLog* net_log);
25 ~LoggingNetworkChangeObserver() override;
26
27 private:
28 // NetworkChangeNotifier::IPAddressObserver implementation.
29 void OnIPAddressChanged() override;
30
31 // NetworkChangeNotifier::ConnectionTypeObserver implementation.
32 void OnConnectionTypeChanged(
33 NetworkChangeNotifier::ConnectionType type) override;
34
35 // NetworkChangeNotifier::NetworkChangeObserver implementation.
36 void OnNetworkChanged(NetworkChangeNotifier::ConnectionType type) override;
37
38 private:
39 NetLog* net_log_;
40 DISALLOW_COPY_AND_ASSIGN(LoggingNetworkChangeObserver);
mmenke 2016/05/12 16:47:58 nit: Blank line before DISALLOW_COPY_AND_ASSIGN
pauljensen 2016/05/12 16:52:56 Done.
41 };
42
43 } // namespace net
44
45 #endif // NET_BASE_LOGGING_NETWORK_CHANGE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698