Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Side by Side Diff: chromeos/network/network_configuration_handler_unittest.cc

Issue 2229383003: chromeos: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chromeos/network/network_configuration_handler.cc ('k') | chromeos/network/network_state_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698