| Index: chromeos/network/network_handler.cc
|
| diff --git a/chromeos/network/network_handler.cc b/chromeos/network/network_handler.cc
|
| index 5eb2a87649014c88835bd890d3473fb5630d46b6..bdf54aabfddc1cba8789cbdeeb9544841ee25a63 100644
|
| --- a/chromeos/network/network_handler.cc
|
| +++ b/chromeos/network/network_handler.cc
|
| @@ -39,7 +39,9 @@ NetworkHandler::~NetworkHandler() {
|
| network_event_log::Shutdown();
|
| }
|
|
|
| -void NetworkHandler::Init() {
|
| +void NetworkHandler::Init(
|
| + const scoped_refptr<base::SequencedTaskRunner>& io_task_runner) {
|
| + cert_loader_->Init(io_task_runner);
|
| network_state_handler_->InitShillPropertyHandler();
|
| network_configuration_handler_->Init(network_state_handler_.get());
|
| managed_network_configuration_handler_->Init(
|
| @@ -52,10 +54,21 @@ void NetworkHandler::Init() {
|
| }
|
|
|
| // static
|
| -void NetworkHandler::Initialize() {
|
| +void NetworkHandler::Initialize(
|
| + const scoped_refptr<base::SequencedTaskRunner>& io_task_runner) {
|
| CHECK(!g_network_handler);
|
| g_network_handler = new NetworkHandler();
|
| - g_network_handler->Init();
|
| + g_network_handler->Init(io_task_runner);
|
| +}
|
| +
|
| +// static
|
| +void NetworkHandler::InitializeForTest() {
|
| + CHECK(!g_network_handler);
|
| + g_network_handler = new NetworkHandler();
|
| + // For Test, run IO operations on the curent thread.
|
| + scoped_refptr<base::SequencedTaskRunner> io_task_runner =
|
| + base::MessageLoopProxy::current();
|
| + g_network_handler->Init(io_task_runner);
|
| }
|
|
|
| // static
|
|
|