Index: chromeos/network/network_handler.cc |
diff --git a/chromeos/network/network_handler.cc b/chromeos/network/network_handler.cc |
index 5eb2a87649014c88835bd890d3473fb5630d46b6..cbe059526337e122767b76f57ac5a403ea56ec88 100644 |
--- a/chromeos/network/network_handler.cc |
+++ b/chromeos/network/network_handler.cc |
@@ -46,7 +46,8 @@ void NetworkHandler::Init() { |
network_state_handler_.get(), |
network_profile_handler_.get(), |
network_configuration_handler_.get()); |
- network_connection_handler_->Init(network_state_handler_.get(), |
+ network_connection_handler_->Init(cert_loader_.get(), |
+ network_state_handler_.get(), |
network_configuration_handler_.get()); |
geolocation_handler_->Init(); |
} |
@@ -59,6 +60,15 @@ void NetworkHandler::Initialize() { |
} |
// static |
+void NetworkHandler::InitializeForTest() { |
+ CHECK(!g_network_handler); |
+ if (!LoginState::IsInitialized()) |
+ LoginState::Initialize(); // OK not to shutdown LoginState for tests. |
+ g_network_handler = new NetworkHandler(); |
+ g_network_handler->Init(); |
+} |
+ |
+// static |
void NetworkHandler::Shutdown() { |
CHECK(g_network_handler); |
delete g_network_handler; |