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 <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 const base::DictionaryValue* new_entry = network->DeepCopy(); | 397 const base::DictionaryValue* new_entry = network->DeepCopy(); |
398 policies->per_network_config[guid] = new_entry; | 398 policies->per_network_config[guid] = new_entry; |
399 | 399 |
400 const base::DictionaryValue* old_entry = old_per_network_config[guid]; | 400 const base::DictionaryValue* old_entry = old_per_network_config[guid]; |
401 if (!old_entry || !old_entry->Equals(new_entry)) | 401 if (!old_entry || !old_entry->Equals(new_entry)) |
402 modified_policies.insert(guid); | 402 modified_policies.insert(guid); |
403 } | 403 } |
404 | 404 |
405 STLDeleteValues(&old_per_network_config); | 405 STLDeleteValues(&old_per_network_config); |
406 ApplyOrQueuePolicies(userhash, &modified_policies); | 406 ApplyOrQueuePolicies(userhash, &modified_policies); |
407 FOR_EACH_OBSERVER(NetworkPolicyObserver, observers_, PolicyChanged(userhash)); | 407 FOR_EACH_OBSERVER(NetworkPolicyObserver, observers_, |
| 408 PoliciesChanged(userhash)); |
408 } | 409 } |
409 | 410 |
410 bool ManagedNetworkConfigurationHandlerImpl::IsAnyPolicyApplicationRunning() | 411 bool ManagedNetworkConfigurationHandlerImpl::IsAnyPolicyApplicationRunning() |
411 const { | 412 const { |
412 return !policy_applicators_.empty() || !queued_modified_policies_.empty(); | 413 return !policy_applicators_.empty() || !queued_modified_policies_.empty(); |
413 } | 414 } |
414 | 415 |
415 bool ManagedNetworkConfigurationHandlerImpl::ApplyOrQueuePolicies( | 416 bool ManagedNetworkConfigurationHandlerImpl::ApplyOrQueuePolicies( |
416 const std::string& userhash, | 417 const std::string& userhash, |
417 std::set<std::string>* modified_policies) { | 418 std::set<std::string>* modified_policies) { |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 scoped_ptr<base::DictionaryValue> network_properties, | 770 scoped_ptr<base::DictionaryValue> network_properties, |
770 GetDevicePropertiesCallback send_callback, | 771 GetDevicePropertiesCallback send_callback, |
771 const std::string& error_name, | 772 const std::string& error_name, |
772 scoped_ptr<base::DictionaryValue> error_data) { | 773 scoped_ptr<base::DictionaryValue> error_data) { |
773 NET_LOG_ERROR("Error getting device properties", service_path); | 774 NET_LOG_ERROR("Error getting device properties", service_path); |
774 send_callback.Run(service_path, network_properties.Pass()); | 775 send_callback.Run(service_path, network_properties.Pass()); |
775 } | 776 } |
776 | 777 |
777 | 778 |
778 } // namespace chromeos | 779 } // namespace chromeos |
OLD | NEW |