| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 .Times(AnyNumber()); | 201 .Times(AnyNumber()); |
| 202 | 202 |
| 203 network_state_handler_ = NetworkStateHandler::InitializeForTest(); | 203 network_state_handler_ = NetworkStateHandler::InitializeForTest(); |
| 204 network_configuration_handler_.reset(new NetworkConfigurationHandler()); | 204 network_configuration_handler_.reset(new NetworkConfigurationHandler()); |
| 205 network_configuration_handler_->Init(network_state_handler_.get(), | 205 network_configuration_handler_->Init(network_state_handler_.get(), |
| 206 NULL /* network_device_handler */); | 206 NULL /* network_device_handler */); |
| 207 base::RunLoop().RunUntilIdle(); | 207 base::RunLoop().RunUntilIdle(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void TearDown() override { | 210 void TearDown() override { |
| 211 network_state_handler_->Shutdown(); |
| 211 network_configuration_handler_.reset(); | 212 network_configuration_handler_.reset(); |
| 212 network_state_handler_.reset(); | 213 network_state_handler_.reset(); |
| 213 DBusThreadManager::Shutdown(); | 214 DBusThreadManager::Shutdown(); |
| 214 } | 215 } |
| 215 | 216 |
| 216 // Handles responses for GetProperties method calls. | 217 // Handles responses for GetProperties method calls. |
| 217 void OnGetProperties( | 218 void OnGetProperties( |
| 218 const dbus::ObjectPath& path, | 219 const dbus::ObjectPath& path, |
| 219 const ShillClientHelper::DictionaryValueCallback& callback) { | 220 const ShillClientHelper::DictionaryValueCallback& callback) { |
| 220 callback.Run(DBUS_METHOD_CALL_SUCCESS, *dictionary_value_result_); | 221 callback.Run(DBUS_METHOD_CALL_SUCCESS, *dictionary_value_result_); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 502 |
| 502 network_configuration_handler_.reset(new NetworkConfigurationHandler()); | 503 network_configuration_handler_.reset(new NetworkConfigurationHandler()); |
| 503 network_configuration_handler_->Init(network_state_handler_.get(), | 504 network_configuration_handler_->Init(network_state_handler_.get(), |
| 504 NULL /* network_device_handler */); | 505 NULL /* network_device_handler */); |
| 505 | 506 |
| 506 base::RunLoop().RunUntilIdle(); | 507 base::RunLoop().RunUntilIdle(); |
| 507 test_observer_->ClearPropertyUpdates(); | 508 test_observer_->ClearPropertyUpdates(); |
| 508 } | 509 } |
| 509 | 510 |
| 510 void TearDown() override { | 511 void TearDown() override { |
| 512 network_state_handler_->Shutdown(); |
| 511 network_configuration_handler_.reset(); | 513 network_configuration_handler_.reset(); |
| 512 network_state_handler_->RemoveObserver(test_observer_.get(), FROM_HERE); | 514 network_state_handler_->RemoveObserver(test_observer_.get(), FROM_HERE); |
| 513 network_state_handler_.reset(); | 515 network_state_handler_.reset(); |
| 514 DBusThreadManager::Shutdown(); | 516 DBusThreadManager::Shutdown(); |
| 515 } | 517 } |
| 516 | 518 |
| 517 void SuccessCallback(const std::string& callback_name) { | 519 void SuccessCallback(const std::string& callback_name) { |
| 518 success_callback_name_ = callback_name; | 520 success_callback_name_ = callback_name; |
| 519 } | 521 } |
| 520 | 522 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 EXPECT_FALSE(test_observer->HasConfiguration(service_path)); | 745 EXPECT_FALSE(test_observer->HasConfiguration(service_path)); |
| 744 EXPECT_FALSE(test_observer->HasConfigurationInProfile( | 746 EXPECT_FALSE(test_observer->HasConfigurationInProfile( |
| 745 service_path, NetworkProfileHandler::GetSharedProfilePath())); | 747 service_path, NetworkProfileHandler::GetSharedProfilePath())); |
| 746 EXPECT_FALSE( | 748 EXPECT_FALSE( |
| 747 test_observer->HasConfigurationInProfile(service_path, user_profile)); | 749 test_observer->HasConfigurationInProfile(service_path, user_profile)); |
| 748 | 750 |
| 749 network_configuration_handler_->RemoveObserver(test_observer.get()); | 751 network_configuration_handler_->RemoveObserver(test_observer.get()); |
| 750 } | 752 } |
| 751 | 753 |
| 752 } // namespace chromeos | 754 } // namespace chromeos |
| OLD | NEW |