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

Unified Diff: chromeos/network/network_state_handler.cc

Issue 14729017: Add NetworkHandler to own network handlers in src/chromeos/network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/network_state_handler.cc
diff --git a/chromeos/network/network_state_handler.cc b/chromeos/network/network_state_handler.cc
index a1909a4f485fa7273aa77bafae0e973ea2af98d8..ff5ac8fce4c0f0af18a63efaff377318523d1e87 100644
--- a/chromeos/network/network_state_handler.cc
+++ b/chromeos/network/network_state_handler.cc
@@ -87,8 +87,6 @@ const char NetworkStateHandler::kMatchTypeWireless[] = "wireless";
const char NetworkStateHandler::kMatchTypeMobile[] = "mobile";
const char NetworkStateHandler::kMatchTypeNonVirtual[] = "non-virtual";
-static NetworkStateHandler* g_network_state_handler = NULL;
-
NetworkStateHandler::NetworkStateHandler() {
}
@@ -102,32 +100,6 @@ void NetworkStateHandler::InitShillPropertyHandler() {
shill_property_handler_->Init();
}
-// static
-void NetworkStateHandler::Initialize() {
- CHECK(!g_network_state_handler);
- g_network_state_handler = new NetworkStateHandler();
- g_network_state_handler->InitShillPropertyHandler();
-}
-
-// static
-bool NetworkStateHandler::IsInitialized() {
- return g_network_state_handler != NULL;
-}
-
-// static
-void NetworkStateHandler::Shutdown() {
- CHECK(g_network_state_handler);
- delete g_network_state_handler;
- g_network_state_handler = NULL;
-}
-
-// static
-NetworkStateHandler* NetworkStateHandler::Get() {
- CHECK(g_network_state_handler)
- << "NetworkStateHandler::Get() called before Initialize()";
- return g_network_state_handler;
-}
-
void NetworkStateHandler::AddObserver(NetworkStateHandlerObserver* observer) {
observers_.AddObserver(observer);
}

Powered by Google App Engine
This is Rietveld 408576698