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

Side by Side Diff: chrome/browser/chromeos/policy/device_network_configuration_updater.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes Created 4 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
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 "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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 11 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
12 #include "chrome/browser/chromeos/settings/cros_settings.h" 12 #include "chrome/browser/chromeos/settings/cros_settings.h"
13 #include "chromeos/chromeos_switches.h" 13 #include "chromeos/chromeos_switches.h"
14 #include "chromeos/network/managed_network_configuration_handler.h" 14 #include "chromeos/network/managed_network_configuration_handler.h"
15 #include "chromeos/network/network_device_handler.h" 15 #include "chromeos/network/network_device_handler.h"
16 #include "chromeos/settings/cros_settings_names.h" 16 #include "chromeos/settings/cros_settings_names.h"
17 #include "chromeos/settings/cros_settings_provider.h" 17 #include "chromeos/settings/cros_settings_provider.h"
18 #include "policy/policy_constants.h" 18 #include "policy/policy_constants.h"
19 19
20 namespace policy { 20 namespace policy {
21 21
22 DeviceNetworkConfigurationUpdater::~DeviceNetworkConfigurationUpdater() {} 22 DeviceNetworkConfigurationUpdater::~DeviceNetworkConfigurationUpdater() {}
23 23
24 // static 24 // static
25 scoped_ptr<DeviceNetworkConfigurationUpdater> 25 std::unique_ptr<DeviceNetworkConfigurationUpdater>
26 DeviceNetworkConfigurationUpdater::CreateForDevicePolicy( 26 DeviceNetworkConfigurationUpdater::CreateForDevicePolicy(
27 PolicyService* policy_service, 27 PolicyService* policy_service,
28 chromeos::ManagedNetworkConfigurationHandler* network_config_handler, 28 chromeos::ManagedNetworkConfigurationHandler* network_config_handler,
29 chromeos::NetworkDeviceHandler* network_device_handler, 29 chromeos::NetworkDeviceHandler* network_device_handler,
30 chromeos::CrosSettings* cros_settings) { 30 chromeos::CrosSettings* cros_settings) {
31 scoped_ptr<DeviceNetworkConfigurationUpdater> updater( 31 std::unique_ptr<DeviceNetworkConfigurationUpdater> updater(
32 new DeviceNetworkConfigurationUpdater(policy_service, 32 new DeviceNetworkConfigurationUpdater(
33 network_config_handler, 33 policy_service, network_config_handler, network_device_handler,
34 network_device_handler, 34 cros_settings));
35 cros_settings));
36 updater->Init(); 35 updater->Init();
37 return updater; 36 return updater;
38 } 37 }
39 38
40 DeviceNetworkConfigurationUpdater::DeviceNetworkConfigurationUpdater( 39 DeviceNetworkConfigurationUpdater::DeviceNetworkConfigurationUpdater(
41 PolicyService* policy_service, 40 PolicyService* policy_service,
42 chromeos::ManagedNetworkConfigurationHandler* network_config_handler, 41 chromeos::ManagedNetworkConfigurationHandler* network_config_handler,
43 chromeos::NetworkDeviceHandler* network_device_handler, 42 chromeos::NetworkDeviceHandler* network_device_handler,
44 chromeos::CrosSettings* cros_settings) 43 chromeos::CrosSettings* cros_settings)
45 : NetworkConfigurationUpdater(onc::ONC_SOURCE_DEVICE_POLICY, 44 : NetworkConfigurationUpdater(onc::ONC_SOURCE_DEVICE_POLICY,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } else { 113 } else {
115 DCHECK_EQ(trusted_status, 114 DCHECK_EQ(trusted_status,
116 chromeos::CrosSettingsProvider::PERMANENTLY_UNTRUSTED); 115 chromeos::CrosSettingsProvider::PERMANENTLY_UNTRUSTED);
117 // Roaming is disabled as we can't determine the correct setting. 116 // Roaming is disabled as we can't determine the correct setting.
118 } 117 }
119 118
120 network_device_handler_->SetCellularAllowRoaming(data_roaming_setting); 119 network_device_handler_->SetCellularAllowRoaming(data_roaming_setting);
121 } 120 }
122 121
123 } // namespace policy 122 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698