| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 int run_count() const { return run_count_; } | 92 int run_count() const { return run_count_; } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 int run_count_; | 95 int run_count_; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 class TestNetworkConfigurationObserver : public NetworkConfigurationObserver { | 98 class TestNetworkConfigurationObserver : public NetworkConfigurationObserver { |
| 99 public: | 99 public: |
| 100 TestNetworkConfigurationObserver() {} | 100 TestNetworkConfigurationObserver() {} |
| 101 ~TestNetworkConfigurationObserver() override { | 101 ~TestNetworkConfigurationObserver() override { |
| 102 STLDeleteContainerPairSecondPointers(configurations_.begin(), | 102 base::STLDeleteContainerPairSecondPointers(configurations_.begin(), |
| 103 configurations_.end()); | 103 configurations_.end()); |
| 104 } | 104 } |
| 105 | 105 |
| 106 // NetworkConfigurationObserver | 106 // NetworkConfigurationObserver |
| 107 void OnConfigurationCreated( | 107 void OnConfigurationCreated( |
| 108 const std::string& service_path, | 108 const std::string& service_path, |
| 109 const std::string& profile_path, | 109 const std::string& profile_path, |
| 110 const base::DictionaryValue& properties, | 110 const base::DictionaryValue& properties, |
| 111 NetworkConfigurationObserver::Source source) override { | 111 NetworkConfigurationObserver::Source source) override { |
| 112 ASSERT_EQ(0u, configurations_.count(service_path)); | 112 ASSERT_EQ(0u, configurations_.count(service_path)); |
| 113 configurations_[service_path] = properties.DeepCopy(); | 113 configurations_[service_path] = properties.DeepCopy(); |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 EXPECT_FALSE(test_observer->HasConfiguration(service_path)); | 745 EXPECT_FALSE(test_observer->HasConfiguration(service_path)); |
| 746 EXPECT_FALSE(test_observer->HasConfigurationInProfile( | 746 EXPECT_FALSE(test_observer->HasConfigurationInProfile( |
| 747 service_path, NetworkProfileHandler::GetSharedProfilePath())); | 747 service_path, NetworkProfileHandler::GetSharedProfilePath())); |
| 748 EXPECT_FALSE( | 748 EXPECT_FALSE( |
| 749 test_observer->HasConfigurationInProfile(service_path, user_profile)); | 749 test_observer->HasConfigurationInProfile(service_path, user_profile)); |
| 750 | 750 |
| 751 network_configuration_handler_->RemoveObserver(test_observer.get()); | 751 network_configuration_handler_->RemoveObserver(test_observer.get()); |
| 752 } | 752 } |
| 753 | 753 |
| 754 } // namespace chromeos | 754 } // namespace chromeos |
| OLD | NEW |