| OLD | NEW |
| 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_configuration_handler.h" | 5 #include "chromeos/network/network_configuration_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 } // namespace | 107 } // namespace |
| 108 | 108 |
| 109 // static | 109 // static |
| 110 void NetworkConfigurationHandler::Initialize() { | 110 void NetworkConfigurationHandler::Initialize() { |
| 111 CHECK(!g_configuration_handler_instance); | 111 CHECK(!g_configuration_handler_instance); |
| 112 g_configuration_handler_instance = new NetworkConfigurationHandler; | 112 g_configuration_handler_instance = new NetworkConfigurationHandler; |
| 113 } | 113 } |
| 114 | 114 |
| 115 // static | 115 // static |
| 116 bool NetworkConfigurationHandler::IsInitialized() { |
| 117 return g_configuration_handler_instance; |
| 118 } |
| 119 |
| 120 // static |
| 116 void NetworkConfigurationHandler::Shutdown() { | 121 void NetworkConfigurationHandler::Shutdown() { |
| 117 CHECK(g_configuration_handler_instance); | 122 CHECK(g_configuration_handler_instance); |
| 118 delete g_configuration_handler_instance; | 123 delete g_configuration_handler_instance; |
| 119 g_configuration_handler_instance = NULL; | 124 g_configuration_handler_instance = NULL; |
| 120 } | 125 } |
| 121 | 126 |
| 122 // static | 127 // static |
| 123 NetworkConfigurationHandler* NetworkConfigurationHandler::Get() { | 128 NetworkConfigurationHandler* NetworkConfigurationHandler::Get() { |
| 124 CHECK(g_configuration_handler_instance) | 129 CHECK(g_configuration_handler_instance) |
| 125 << "NetworkConfigurationHandler::Get() called before Initialize()"; | 130 << "NetworkConfigurationHandler::Get() called before Initialize()"; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 kLogModule, service_path, error_callback)); | 216 kLogModule, service_path, error_callback)); |
| 212 } | 217 } |
| 213 | 218 |
| 214 NetworkConfigurationHandler::NetworkConfigurationHandler() { | 219 NetworkConfigurationHandler::NetworkConfigurationHandler() { |
| 215 } | 220 } |
| 216 | 221 |
| 217 NetworkConfigurationHandler::~NetworkConfigurationHandler() { | 222 NetworkConfigurationHandler::~NetworkConfigurationHandler() { |
| 218 } | 223 } |
| 219 | 224 |
| 220 } // namespace chromeos | 225 } // namespace chromeos |
| OLD | NEW |