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

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: address comments 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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/base/logging_network_change_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/net_export.h"
10 #include "net/base/network_change_notifier.h"
11
12 namespace net {
13
14 class NetLog;
15
16 // A class that adds NetLog events for network change events coming from the
17 // net::NetworkChangeNotifier.
18 class NET_EXPORT LoggingNetworkChangeObserver
19 : public NetworkChangeNotifier::IPAddressObserver,
20 public NetworkChangeNotifier::ConnectionTypeObserver,
21 public NetworkChangeNotifier::NetworkChangeObserver {
22 public:
23 // Note: |net_log| must remain valid throughout the lifetime of this
24 // LoggingNetworkChangeObserver.
25 explicit LoggingNetworkChangeObserver(NetLog* net_log);
26 ~LoggingNetworkChangeObserver() override;
27
28 private:
29 // NetworkChangeNotifier::IPAddressObserver implementation.
30 void OnIPAddressChanged() override;
31
32 // NetworkChangeNotifier::ConnectionTypeObserver implementation.
33 void OnConnectionTypeChanged(
34 NetworkChangeNotifier::ConnectionType type) override;
35
36 // NetworkChangeNotifier::NetworkChangeObserver implementation.
37 void OnNetworkChanged(NetworkChangeNotifier::ConnectionType type) override;
38
39 private:
40 NetLog* net_log_;
41
42 DISALLOW_COPY_AND_ASSIGN(LoggingNetworkChangeObserver);
43 };
44
45 } // namespace net
46
47 #endif // NET_BASE_LOGGING_NETWORK_CHANGE_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/base/logging_network_change_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698