| OLD | NEW |
| 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 } | 435 } |
| 436 | 436 |
| 437 GuidToPolicyMap old_per_network_config; | 437 GuidToPolicyMap old_per_network_config; |
| 438 policies->per_network_config.swap(old_per_network_config); | 438 policies->per_network_config.swap(old_per_network_config); |
| 439 | 439 |
| 440 // This stores all GUIDs of policies that have changed or are new. | 440 // This stores all GUIDs of policies that have changed or are new. |
| 441 std::set<std::string> modified_policies; | 441 std::set<std::string> modified_policies; |
| 442 | 442 |
| 443 for (base::ListValue::const_iterator it = network_configs_onc.begin(); | 443 for (base::ListValue::const_iterator it = network_configs_onc.begin(); |
| 444 it != network_configs_onc.end(); ++it) { | 444 it != network_configs_onc.end(); ++it) { |
| 445 base::DictionaryValue* network = NULL; | 445 const base::DictionaryValue* network = NULL; |
| 446 (*it)->GetAsDictionary(&network); | 446 it->GetAsDictionary(&network); |
| 447 DCHECK(network); | 447 DCHECK(network); |
| 448 | 448 |
| 449 std::string guid; | 449 std::string guid; |
| 450 network->GetStringWithoutPathExpansion(::onc::network_config::kGUID, &guid); | 450 network->GetStringWithoutPathExpansion(::onc::network_config::kGUID, &guid); |
| 451 DCHECK(!guid.empty()); | 451 DCHECK(!guid.empty()); |
| 452 | 452 |
| 453 if (policies->per_network_config.count(guid) > 0) { | 453 if (policies->per_network_config.count(guid) > 0) { |
| 454 NET_LOG_ERROR("ONC from " + ToDebugString(onc_source, userhash) + | 454 NET_LOG_ERROR("ONC from " + ToDebugString(onc_source, userhash) + |
| 455 " contains several entries for the same GUID ", guid); | 455 " contains several entries for the same GUID ", guid); |
| 456 } | 456 } |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 std::unique_ptr<base::DictionaryValue> network_properties, | 852 std::unique_ptr<base::DictionaryValue> network_properties, |
| 853 GetDevicePropertiesCallback send_callback, | 853 GetDevicePropertiesCallback send_callback, |
| 854 const std::string& error_name, | 854 const std::string& error_name, |
| 855 std::unique_ptr<base::DictionaryValue> error_data) { | 855 std::unique_ptr<base::DictionaryValue> error_data) { |
| 856 NET_LOG_ERROR("Error getting device properties", service_path); | 856 NET_LOG_ERROR("Error getting device properties", service_path); |
| 857 send_callback.Run(service_path, std::move(network_properties)); | 857 send_callback.Run(service_path, std::move(network_properties)); |
| 858 } | 858 } |
| 859 | 859 |
| 860 | 860 |
| 861 } // namespace chromeos | 861 } // namespace chromeos |
| OLD | NEW |