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

Side by Side Diff: chromeos/network/network_change_notifier_chromeos.h

Issue 12927009: NetworkChangeNotifierChromeos: Invalidate network resources on system resume (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chromeos/network/network_change_notifier_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
6 #define CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ 6 #define CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chromeos/chromeos_export.h" 13 #include "chromeos/chromeos_export.h"
14 #include "chromeos/dbus/power_manager_client.h"
14 #include "chromeos/network/network_state_handler_observer.h" 15 #include "chromeos/network/network_state_handler_observer.h"
15 #include "net/base/network_change_notifier.h" 16 #include "net/base/network_change_notifier.h"
16 17
17 namespace chromeos { 18 namespace chromeos {
18 19
19 class CHROMEOS_EXPORT NetworkChangeNotifierChromeos 20 class CHROMEOS_EXPORT NetworkChangeNotifierChromeos
20 : public net::NetworkChangeNotifier, 21 : public net::NetworkChangeNotifier,
22 public chromeos::PowerManagerClient::Observer,
21 public chromeos::NetworkStateHandlerObserver { 23 public chromeos::NetworkStateHandlerObserver {
22 public: 24 public:
23 NetworkChangeNotifierChromeos(); 25 NetworkChangeNotifierChromeos();
24 virtual ~NetworkChangeNotifierChromeos(); 26 virtual ~NetworkChangeNotifierChromeos();
25 27
26 // Starts observing changes from the network state handler. 28 // Starts observing changes from the network state handler.
27 void Initialize(); 29 void Initialize();
28 30
29 // Stops observing changes from the network state handler. 31 // Stops observing changes from the network state handler.
30 void Shutdown(); 32 void Shutdown();
31 33
32 // NetworkChangeNotifier overrides. 34 // NetworkChangeNotifier overrides.
33 virtual net::NetworkChangeNotifier::ConnectionType 35 virtual net::NetworkChangeNotifier::ConnectionType
34 GetCurrentConnectionType() const OVERRIDE; 36 GetCurrentConnectionType() const OVERRIDE;
35 37
38 // PowerManagerClient::Observer overrides.
39 virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE;
40
36 // NetworkStateHandlerObserver overrides. 41 // NetworkStateHandlerObserver overrides.
37 virtual void DefaultNetworkChanged( 42 virtual void DefaultNetworkChanged(
38 const chromeos::NetworkState* default_network) OVERRIDE; 43 const chromeos::NetworkState* default_network) OVERRIDE;
39 44
40 private: 45 private:
41 FRIEND_TEST_ALL_PREFIXES(NetworkChangeNotifierChromeosTest, 46 FRIEND_TEST_ALL_PREFIXES(NetworkChangeNotifierChromeosTest,
42 ConnectionTypeFromShill); 47 ConnectionTypeFromShill);
43 friend class NetworkChangeNotifierChromeosUpdateTest; 48 friend class NetworkChangeNotifierChromeosUpdateTest;
44 49
45 class DnsConfigService; 50 class DnsConfigService;
(...skipping 26 matching lines...) Expand all
72 std::string service_path_; 77 std::string service_path_;
73 78
74 scoped_ptr<DnsConfigService> dns_config_service_; 79 scoped_ptr<DnsConfigService> dns_config_service_;
75 80
76 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierChromeos); 81 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierChromeos);
77 }; 82 };
78 83
79 } // namespace chromeos 84 } // namespace chromeos
80 85
81 #endif // CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ 86 #endif // CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/network_change_notifier_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698