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

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

Issue 12548014: Enable ash new network status area by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests, ash_shell 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
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_STATE_HANDLER_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 : public internal::ShillPropertyHandler::Listener { 54 : public internal::ShillPropertyHandler::Listener {
55 public: 55 public:
56 typedef std::vector<ManagedState*> ManagedStateList; 56 typedef std::vector<ManagedState*> ManagedStateList;
57 typedef std::vector<const NetworkState*> NetworkStateList; 57 typedef std::vector<const NetworkState*> NetworkStateList;
58 58
59 virtual ~NetworkStateHandler(); 59 virtual ~NetworkStateHandler();
60 60
61 // Sets the global instance. Must be called before any calls to Get(). 61 // Sets the global instance. Must be called before any calls to Get().
62 static void Initialize(); 62 static void Initialize();
63 63
64 // Returns true if the global instance has been initialized.
65 static bool IsInitialized();
66
64 // Destroys the global instance. 67 // Destroys the global instance.
65 static void Shutdown(); 68 static void Shutdown();
66 69
67 // Gets the global instance. Initialize() must be called first. 70 // Gets the global instance. Initialize() must be called first.
68 static NetworkStateHandler* Get(); 71 static NetworkStateHandler* Get();
69 72
70 // Add/remove observers. 73 // Add/remove observers.
71 void AddObserver(NetworkStateHandlerObserver* observer); 74 void AddObserver(NetworkStateHandlerObserver* observer);
72 void RemoveObserver(NetworkStateHandlerObserver* observer); 75 void RemoveObserver(NetworkStateHandlerObserver* observer);
73 76
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 230
228 // Keeps track of the default network for notifying observers when it changes. 231 // Keeps track of the default network for notifying observers when it changes.
229 std::string default_network_path_; 232 std::string default_network_path_;
230 233
231 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); 234 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler);
232 }; 235 };
233 236
234 } // namespace chromeos 237 } // namespace chromeos
235 238
236 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ 239 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698