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

Side by Side Diff: chrome/browser/chromeos/net/network_change_notifier_chromeos.h

Issue 8423077: chromeos: Split NetworkChangeNotifierChromeos initialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/task.h" 11 #include "base/task.h"
12 #include "chrome/browser/chromeos/cros/network_library.h" 12 #include "chrome/browser/chromeos/cros/network_library.h"
13 #include "chrome/browser/chromeos/cros/power_library.h" 13 #include "chrome/browser/chromeos/cros/power_library.h"
14 #include "net/base/network_change_notifier.h" 14 #include "net/base/network_change_notifier.h"
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 class OnlineStatusReportThreadTask; 18 class OnlineStatusReportThreadTask;
19 19
20 class NetworkChangeNotifierChromeos 20 class NetworkChangeNotifierChromeos
21 : public net::NetworkChangeNotifier, 21 : public net::NetworkChangeNotifier,
22 public chromeos::PowerLibrary::Observer, 22 public chromeos::PowerLibrary::Observer,
23 public chromeos::NetworkLibrary::NetworkObserver, 23 public chromeos::NetworkLibrary::NetworkObserver,
24 public chromeos::NetworkLibrary::NetworkManagerObserver { 24 public chromeos::NetworkLibrary::NetworkManagerObserver {
25 public: 25 public:
26 NetworkChangeNotifierChromeos(); 26 NetworkChangeNotifierChromeos();
27 virtual ~NetworkChangeNotifierChromeos(); 27 virtual ~NetworkChangeNotifierChromeos();
28 28
29 // Initializes the network change notifier. Starts to observe changes
30 // from the power manager and the network manager.
31 void Init();
32
29 private: 33 private:
30 friend class OnlineStatusReportThreadTask; 34 friend class OnlineStatusReportThreadTask;
31 35
32 // PowerLibrary::Observer overrides. 36 // PowerLibrary::Observer overrides.
33 virtual void PowerChanged(const PowerSupplyStatus& status) OVERRIDE; 37 virtual void PowerChanged(const PowerSupplyStatus& status) OVERRIDE;
34 virtual void SystemResumed() OVERRIDE; 38 virtual void SystemResumed() OVERRIDE;
35 39
36 // NetworkChangeNotifier overrides. 40 // NetworkChangeNotifier overrides.
37 virtual bool IsCurrentlyOffline() const OVERRIDE; 41 virtual bool IsCurrentlyOffline() const OVERRIDE;
38 42
(...skipping 26 matching lines...) Expand all
65 chromeos::ConnectionState connection_state_; 69 chromeos::ConnectionState connection_state_;
66 // Current active network's service path. 70 // Current active network's service path.
67 std::string service_path_; 71 std::string service_path_;
68 // Current active network's IP address. 72 // Current active network's IP address.
69 std::string ip_address_; 73 std::string ip_address_;
70 74
71 OnlineStatusReportThreadTask* online_notification_task_; 75 OnlineStatusReportThreadTask* online_notification_task_;
72 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierChromeos); 76 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierChromeos);
73 }; 77 };
74 78
75 } // namespace net 79 } // namespace chromeos
76 80
77 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ 81 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698