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/shill_property_handler.h" | 5 #include "chromeos/network/shill_property_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 return std::string(); | 124 return std::string(); |
125 } | 125 } |
126 | 126 |
127 void UpdateEntries(const std::string& type, const base::ListValue& entries) { | 127 void UpdateEntries(const std::string& type, const base::ListValue& entries) { |
128 if (type.empty()) | 128 if (type.empty()) |
129 return; | 129 return; |
130 entries_[type].clear(); | 130 entries_[type].clear(); |
131 for (base::ListValue::const_iterator iter = entries.begin(); | 131 for (base::ListValue::const_iterator iter = entries.begin(); |
132 iter != entries.end(); ++iter) { | 132 iter != entries.end(); ++iter) { |
133 std::string path; | 133 std::string path; |
134 if ((*iter)->GetAsString(&path)) | 134 if (iter->GetAsString(&path)) |
135 entries_[type].push_back(path); | 135 entries_[type].push_back(path); |
136 } | 136 } |
137 } | 137 } |
138 | 138 |
139 void AddPropertyUpdate(const std::string& type, const std::string& path) { | 139 void AddPropertyUpdate(const std::string& type, const std::string& path) { |
140 DCHECK(!type.empty()); | 140 DCHECK(!type.empty()); |
141 VLOG(2) << "AddPropertyUpdate: " << type; | 141 VLOG(2) << "AddPropertyUpdate: " << type; |
142 property_updates(type)[path] += 1; | 142 property_updates(type)[path] += 1; |
143 } | 143 } |
144 | 144 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 shill_property_handler_->SetProhibitedTechnologies( | 527 shill_property_handler_->SetProhibitedTechnologies( |
528 prohibited_technologies, network_handler::ErrorCallback()); | 528 prohibited_technologies, network_handler::ErrorCallback()); |
529 shill_property_handler_->SetTechnologyEnabled( | 529 shill_property_handler_->SetTechnologyEnabled( |
530 shill::kTypeEthernet, true, network_handler::ErrorCallback()); | 530 shill::kTypeEthernet, true, network_handler::ErrorCallback()); |
531 base::RunLoop().RunUntilIdle(); | 531 base::RunLoop().RunUntilIdle(); |
532 EXPECT_TRUE( | 532 EXPECT_TRUE( |
533 shill_property_handler_->IsTechnologyEnabled(shill::kTypeEthernet)); | 533 shill_property_handler_->IsTechnologyEnabled(shill::kTypeEthernet)); |
534 } | 534 } |
535 | 535 |
536 } // namespace chromeos | 536 } // namespace chromeos |
OLD | NEW |