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

Unified Diff: chromeos/network/network_configuration_handler.cc

Issue 11414101: This adds ManagedNetworkConfigurationHandler first pass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload after merge Created 7 years, 11 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_configuration_handler.cc
diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc
index 2f3ebb28b6075ff74c3f196cc3d563e69207fd89..05bfd11ebfb9df7bd02e77729a5aa7da4122c9a7 100644
--- a/chromeos/network/network_configuration_handler.cc
+++ b/chromeos/network/network_configuration_handler.cc
@@ -20,12 +20,12 @@
namespace chromeos {
-static NetworkConfigurationHandler* g_network_configuration_handler = NULL;
-
namespace {
const char kLogModule[] = "NetworkConfigurationHandler";
+NetworkConfigurationHandler* g_configuration_handler_instance = NULL;
+
// None of these error messages are user-facing: they should only appear in
// logs.
const char kErrorsListTag[] = "errors";
@@ -101,30 +101,24 @@ void RunCreateNetworkCallback(
} // namespace
-NetworkConfigurationHandler::NetworkConfigurationHandler() {
-}
-
-NetworkConfigurationHandler::~NetworkConfigurationHandler() {
-}
-
// static
void NetworkConfigurationHandler::Initialize() {
- CHECK(!g_network_configuration_handler);
- g_network_configuration_handler = new NetworkConfigurationHandler();
+ CHECK(!g_configuration_handler_instance);
+ g_configuration_handler_instance = new NetworkConfigurationHandler;
}
// static
void NetworkConfigurationHandler::Shutdown() {
- CHECK(g_network_configuration_handler);
- delete g_network_configuration_handler;
- g_network_configuration_handler = NULL;
+ CHECK(g_configuration_handler_instance);
+ delete g_configuration_handler_instance;
+ g_configuration_handler_instance = NULL;
}
// static
NetworkConfigurationHandler* NetworkConfigurationHandler::Get() {
- CHECK(g_network_configuration_handler)
+ CHECK(g_configuration_handler_instance)
<< "NetworkConfigurationHandler::Get() called before Initialize()";
- return g_network_configuration_handler;
+ return g_configuration_handler_instance;
}
void NetworkConfigurationHandler::GetProperties(
@@ -212,4 +206,10 @@ void NetworkConfigurationHandler::RemoveConfiguration(
kLogModule, service_path, error_callback));
}
+NetworkConfigurationHandler::NetworkConfigurationHandler() {
+}
+
+NetworkConfigurationHandler::~NetworkConfigurationHandler() {
+}
+
} // namespace chromeos
« no previous file with comments | « chromeos/network/network_configuration_handler.h ('k') | chromeos/network/network_configuration_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698