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

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

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Rebase 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/geolocation_handler.cc ('k') | chromeos/network/network_sms_handler.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/managed_network_configuration_handler_impl.h" 5 #include "chromeos/network/managed_network_configuration_handler_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 489 }
490 490
491 GuidToPolicyMap old_per_network_config; 491 GuidToPolicyMap old_per_network_config;
492 policies->per_network_config.swap(old_per_network_config); 492 policies->per_network_config.swap(old_per_network_config);
493 493
494 // This stores all GUIDs of policies that have changed or are new. 494 // This stores all GUIDs of policies that have changed or are new.
495 std::set<std::string> modified_policies; 495 std::set<std::string> modified_policies;
496 496
497 for (base::ListValue::const_iterator it = network_configs_onc.begin(); 497 for (base::ListValue::const_iterator it = network_configs_onc.begin();
498 it != network_configs_onc.end(); ++it) { 498 it != network_configs_onc.end(); ++it) {
499 base::DictionaryValue* network = NULL; 499 const base::DictionaryValue* network = NULL;
500 (*it)->GetAsDictionary(&network); 500 it->GetAsDictionary(&network);
501 DCHECK(network); 501 DCHECK(network);
502 502
503 std::string guid; 503 std::string guid;
504 network->GetStringWithoutPathExpansion(::onc::network_config::kGUID, &guid); 504 network->GetStringWithoutPathExpansion(::onc::network_config::kGUID, &guid);
505 DCHECK(!guid.empty()); 505 DCHECK(!guid.empty());
506 506
507 if (policies->per_network_config.count(guid) > 0) { 507 if (policies->per_network_config.count(guid) > 0) {
508 NET_LOG_ERROR("ONC from " + ToDebugString(onc_source, userhash) + 508 NET_LOG_ERROR("ONC from " + ToDebugString(onc_source, userhash) +
509 " contains several entries for the same GUID ", guid); 509 " contains several entries for the same GUID ", guid);
510 } 510 }
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 std::unique_ptr<base::DictionaryValue> network_properties, 906 std::unique_ptr<base::DictionaryValue> network_properties,
907 GetDevicePropertiesCallback send_callback, 907 GetDevicePropertiesCallback send_callback,
908 const std::string& error_name, 908 const std::string& error_name,
909 std::unique_ptr<base::DictionaryValue> error_data) { 909 std::unique_ptr<base::DictionaryValue> error_data) {
910 NET_LOG_ERROR("Error getting device properties", service_path); 910 NET_LOG_ERROR("Error getting device properties", service_path);
911 send_callback.Run(service_path, std::move(network_properties)); 911 send_callback.Run(service_path, std::move(network_properties));
912 } 912 }
913 913
914 914
915 } // namespace chromeos 915 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/geolocation_handler.cc ('k') | chromeos/network/network_sms_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698