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 "chrome/browser/chromeos/policy/device_network_configuration_updater.h" | 5 #include "chrome/browser/chromeos/policy/device_network_configuration_updater.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "chrome/browser/chromeos/settings/cros_settings.h" | 9 #include "chrome/browser/chromeos/settings/cros_settings.h" |
10 #include "chromeos/network/managed_network_configuration_handler.h" | 10 #include "chromeos/network/managed_network_configuration_handler.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 PolicyService* policy_service, | 23 PolicyService* policy_service, |
24 chromeos::ManagedNetworkConfigurationHandler* network_config_handler, | 24 chromeos::ManagedNetworkConfigurationHandler* network_config_handler, |
25 chromeos::NetworkDeviceHandler* network_device_handler, | 25 chromeos::NetworkDeviceHandler* network_device_handler, |
26 chromeos::CrosSettings* cros_settings) { | 26 chromeos::CrosSettings* cros_settings) { |
27 scoped_ptr<DeviceNetworkConfigurationUpdater> updater( | 27 scoped_ptr<DeviceNetworkConfigurationUpdater> updater( |
28 new DeviceNetworkConfigurationUpdater(policy_service, | 28 new DeviceNetworkConfigurationUpdater(policy_service, |
29 network_config_handler, | 29 network_config_handler, |
30 network_device_handler, | 30 network_device_handler, |
31 cros_settings)); | 31 cros_settings)); |
32 updater->Init(); | 32 updater->Init(); |
33 return updater.Pass(); | 33 return updater; |
34 } | 34 } |
35 | 35 |
36 DeviceNetworkConfigurationUpdater::DeviceNetworkConfigurationUpdater( | 36 DeviceNetworkConfigurationUpdater::DeviceNetworkConfigurationUpdater( |
37 PolicyService* policy_service, | 37 PolicyService* policy_service, |
38 chromeos::ManagedNetworkConfigurationHandler* network_config_handler, | 38 chromeos::ManagedNetworkConfigurationHandler* network_config_handler, |
39 chromeos::NetworkDeviceHandler* network_device_handler, | 39 chromeos::NetworkDeviceHandler* network_device_handler, |
40 chromeos::CrosSettings* cros_settings) | 40 chromeos::CrosSettings* cros_settings) |
41 : NetworkConfigurationUpdater(onc::ONC_SOURCE_DEVICE_POLICY, | 41 : NetworkConfigurationUpdater(onc::ONC_SOURCE_DEVICE_POLICY, |
42 key::kDeviceOpenNetworkConfiguration, | 42 key::kDeviceOpenNetworkConfiguration, |
43 policy_service, | 43 policy_service, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } else { | 99 } else { |
100 DCHECK_EQ(trusted_status, | 100 DCHECK_EQ(trusted_status, |
101 chromeos::CrosSettingsProvider::PERMANENTLY_UNTRUSTED); | 101 chromeos::CrosSettingsProvider::PERMANENTLY_UNTRUSTED); |
102 // Roaming is disabled as we can't determine the correct setting. | 102 // Roaming is disabled as we can't determine the correct setting. |
103 } | 103 } |
104 | 104 |
105 network_device_handler_->SetCellularAllowRoaming(data_roaming_setting); | 105 network_device_handler_->SetCellularAllowRoaming(data_roaming_setting); |
106 } | 106 } |
107 | 107 |
108 } // namespace policy | 108 } // namespace policy |
OLD | NEW |