Chromium Code Reviews| 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_connection_handler.h" | 5 #include "chromeos/network/network_connection_handler.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 | 145 |
| 146 network_profile_handler_.reset(new NetworkProfileHandler()); | 146 network_profile_handler_.reset(new NetworkProfileHandler()); |
| 147 network_profile_handler_->Init(); | 147 network_profile_handler_->Init(); |
| 148 | 148 |
| 149 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); | 149 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); |
| 150 managed_config_handler_->Init( | 150 managed_config_handler_->Init( |
| 151 network_state_handler(), network_profile_handler_.get(), | 151 network_state_handler(), network_profile_handler_.get(), |
| 152 network_config_handler_.get(), nullptr /* network_device_handler */, | 152 network_config_handler_.get(), nullptr /* network_device_handler */, |
| 153 nullptr /* prohibited_tecnologies_handler */); | 153 nullptr /* prohibited_tecnologies_handler */); |
| 154 | 154 |
| 155 network_connection_handler_.reset(new NetworkConnectionHandler); | 155 network_connection_handler_ = NetworkConnectionHandler::Create(); |
|
stevenjb
2017/05/03 22:05:38
new NetworkConnectionHandlerImpl(), just like we d
Kyle Horimoto
2017/05/03 22:38:30
Done.
| |
| 156 network_connection_handler_->Init(network_state_handler(), | 156 network_connection_handler_->Init(network_state_handler(), |
| 157 network_config_handler_.get(), | 157 network_config_handler_.get(), |
| 158 managed_config_handler_.get()); | 158 managed_config_handler_.get()); |
| 159 network_connection_observer_.reset(new TestNetworkConnectionObserver); | 159 network_connection_observer_.reset(new TestNetworkConnectionObserver); |
| 160 network_connection_handler_->AddObserver( | 160 network_connection_handler_->AddObserver( |
| 161 network_connection_observer_.get()); | 161 network_connection_observer_.get()); |
| 162 | 162 |
| 163 base::RunLoop().RunUntilIdle(); | 163 base::RunLoop().RunUntilIdle(); |
| 164 | 164 |
| 165 fake_tether_delegate_.reset(new FakeTetherDelegate()); | 165 fake_tether_delegate_.reset(new FakeTetherDelegate()); |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 534 EXPECT_EQ( | 534 EXPECT_EQ( |
| 535 NetworkConnectionHandler::kErrorTetherConnectionAttemptWithNoDelegate, | 535 NetworkConnectionHandler::kErrorTetherConnectionAttemptWithNoDelegate, |
| 536 GetResultAndReset()); | 536 GetResultAndReset()); |
| 537 EXPECT_TRUE(network_connection_observer_->GetRequested(kTetherGuid)); | 537 EXPECT_TRUE(network_connection_observer_->GetRequested(kTetherGuid)); |
| 538 EXPECT_EQ( | 538 EXPECT_EQ( |
| 539 NetworkConnectionHandler::kErrorTetherConnectionAttemptWithNoDelegate, | 539 NetworkConnectionHandler::kErrorTetherConnectionAttemptWithNoDelegate, |
| 540 network_connection_observer_->GetResult(kTetherGuid)); | 540 network_connection_observer_->GetResult(kTetherGuid)); |
| 541 } | 541 } |
| 542 | 542 |
| 543 } // namespace chromeos | 543 } // namespace chromeos |
| OLD | NEW |