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

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

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chromeos/network/shill_property_handler.cc ('k') | chromeos/printing/ppd_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « chromeos/network/shill_property_handler.cc ('k') | chromeos/printing/ppd_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698