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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 | 437 |
438 void ManagedNetworkConfigurationHandlerImpl::RemoveConfiguration( | 438 void ManagedNetworkConfigurationHandlerImpl::RemoveConfiguration( |
439 const std::string& service_path, | 439 const std::string& service_path, |
440 const base::Closure& callback, | 440 const base::Closure& callback, |
441 const network_handler::ErrorCallback& error_callback) const { | 441 const network_handler::ErrorCallback& error_callback) const { |
442 network_configuration_handler_->RemoveConfiguration( | 442 network_configuration_handler_->RemoveConfiguration( |
443 service_path, NetworkConfigurationObserver::SOURCE_USER_ACTION, callback, | 443 service_path, NetworkConfigurationObserver::SOURCE_USER_ACTION, callback, |
444 error_callback); | 444 error_callback); |
445 } | 445 } |
446 | 446 |
| 447 void ManagedNetworkConfigurationHandlerImpl:: |
| 448 RemoveConfigurationFromCurrentProfile( |
| 449 const std::string& service_path, |
| 450 const base::Closure& callback, |
| 451 const network_handler::ErrorCallback& error_callback) const { |
| 452 network_configuration_handler_->RemoveConfigurationFromCurrentProfile( |
| 453 service_path, NetworkConfigurationObserver::SOURCE_USER_ACTION, callback, |
| 454 error_callback); |
| 455 } |
| 456 |
447 void ManagedNetworkConfigurationHandlerImpl::SetPolicy( | 457 void ManagedNetworkConfigurationHandlerImpl::SetPolicy( |
448 ::onc::ONCSource onc_source, | 458 ::onc::ONCSource onc_source, |
449 const std::string& userhash, | 459 const std::string& userhash, |
450 const base::ListValue& network_configs_onc, | 460 const base::ListValue& network_configs_onc, |
451 const base::DictionaryValue& global_network_config) { | 461 const base::DictionaryValue& global_network_config) { |
452 VLOG(1) << "Setting policies from " << ToDebugString(onc_source, userhash) | 462 VLOG(1) << "Setting policies from " << ToDebugString(onc_source, userhash) |
453 << "."; | 463 << "."; |
454 | 464 |
455 // |userhash| must be empty for device policies. | 465 // |userhash| must be empty for device policies. |
456 DCHECK(onc_source != ::onc::ONC_SOURCE_DEVICE_POLICY || | 466 DCHECK(onc_source != ::onc::ONC_SOURCE_DEVICE_POLICY || |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 std::unique_ptr<base::DictionaryValue> network_properties, | 906 std::unique_ptr<base::DictionaryValue> network_properties, |
897 GetDevicePropertiesCallback send_callback, | 907 GetDevicePropertiesCallback send_callback, |
898 const std::string& error_name, | 908 const std::string& error_name, |
899 std::unique_ptr<base::DictionaryValue> error_data) { | 909 std::unique_ptr<base::DictionaryValue> error_data) { |
900 NET_LOG_ERROR("Error getting device properties", service_path); | 910 NET_LOG_ERROR("Error getting device properties", service_path); |
901 send_callback.Run(service_path, std::move(network_properties)); | 911 send_callback.Run(service_path, std::move(network_properties)); |
902 } | 912 } |
903 | 913 |
904 | 914 |
905 } // namespace chromeos | 915 } // namespace chromeos |
OLD | NEW |