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

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

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
« no previous file with comments | « chromeos/network/network_state_handler.h ('k') | no next file » | 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 #include "chromeos/network/network_state_handler.h" 5 #include "chromeos/network/network_state_handler.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 // static 97 // static
98 void NetworkStateHandler::Initialize() { 98 void NetworkStateHandler::Initialize() {
99 CHECK(!g_network_state_handler); 99 CHECK(!g_network_state_handler);
100 g_network_state_handler = new NetworkStateHandler(); 100 g_network_state_handler = new NetworkStateHandler();
101 g_network_state_handler->InitShillPropertyHandler(); 101 g_network_state_handler->InitShillPropertyHandler();
102 } 102 }
103 103
104 // static 104 // static
105 bool NetworkStateHandler::IsInitialized() {
106 return g_network_state_handler != NULL;
gauravsh 2013/03/07 01:36:35 Why do we need this? Doesn't the existing code alw
107 }
108
109 // static
105 void NetworkStateHandler::Shutdown() { 110 void NetworkStateHandler::Shutdown() {
106 CHECK(g_network_state_handler); 111 CHECK(g_network_state_handler);
107 delete g_network_state_handler; 112 delete g_network_state_handler;
108 g_network_state_handler = NULL; 113 g_network_state_handler = NULL;
109 } 114 }
110 115
111 // static 116 // static
112 NetworkStateHandler* NetworkStateHandler::Get() { 117 NetworkStateHandler* NetworkStateHandler::Get() {
113 CHECK(g_network_state_handler) 118 CHECK(g_network_state_handler)
114 << "NetworkStateHandler::Get() called before Initialize()"; 119 << "NetworkStateHandler::Get() called before Initialize()";
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 void NetworkStateHandler::OnDefaultNetworkChanged() { 539 void NetworkStateHandler::OnDefaultNetworkChanged() {
535 const NetworkState* default_network = DefaultNetwork(); 540 const NetworkState* default_network = DefaultNetwork();
536 network_event_log::AddEntry( 541 network_event_log::AddEntry(
537 kLogModule, "DefaultNetworkChanged", 542 kLogModule, "DefaultNetworkChanged",
538 default_network ? default_network->path() : "None"); 543 default_network ? default_network->path() : "None");
539 FOR_EACH_OBSERVER(NetworkStateHandlerObserver, observers_, 544 FOR_EACH_OBSERVER(NetworkStateHandlerObserver, observers_,
540 DefaultNetworkChanged(default_network)); 545 DefaultNetworkChanged(default_network));
541 } 546 }
542 547
543 } // namespace chromeos 548 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698