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

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

Issue 2061093002: Revert of Add support for MAC address randomization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const policy::BrowserPolicyConnectorChromeOS* connector = 65 const policy::BrowserPolicyConnectorChromeOS* connector =
66 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 66 g_browser_process->platform_part()->browser_policy_connector_chromeos();
67 if (!connector->IsEnterpriseManaged() && 67 if (!connector->IsEnterpriseManaged() &&
68 base::CommandLine::ForCurrentProcess()->HasSwitch( 68 base::CommandLine::ForCurrentProcess()->HasSwitch(
69 chromeos::switches::kAllowDataRoamingByDefault)) { 69 chromeos::switches::kAllowDataRoamingByDefault)) {
70 network_device_handler_->SetCellularAllowRoaming(true); 70 network_device_handler_->SetCellularAllowRoaming(true);
71 } else { 71 } else {
72 // Apply the roaming setting initially. 72 // Apply the roaming setting initially.
73 OnDataRoamingSettingChanged(); 73 OnDataRoamingSettingChanged();
74 } 74 }
75
76 // Set up MAC address randomization if we are not enterprise managed.
77 network_device_handler_->SetMACAddressRandomizationEnabled(
78 !connector->IsEnterpriseManaged());
79 } 75 }
80 76
81 void DeviceNetworkConfigurationUpdater::ImportCertificates( 77 void DeviceNetworkConfigurationUpdater::ImportCertificates(
82 const base::ListValue& certificates_onc) { 78 const base::ListValue& certificates_onc) {
83 // Importing CA and server certs from device policy is not allowed, while 79 // Importing CA and server certs from device policy is not allowed, while
84 // importing client is not yet supported (as a system-wide PKCS#11 token to 80 // importing client is not yet supported (as a system-wide PKCS#11 token to
85 // which they should be imported does not exists at the time). 81 // which they should be imported does not exists at the time).
86 } 82 }
87 83
88 void DeviceNetworkConfigurationUpdater::ApplyNetworkPolicy( 84 void DeviceNetworkConfigurationUpdater::ApplyNetworkPolicy(
(...skipping 28 matching lines...) Expand all
117 } else { 113 } else {
118 DCHECK_EQ(trusted_status, 114 DCHECK_EQ(trusted_status,
119 chromeos::CrosSettingsProvider::PERMANENTLY_UNTRUSTED); 115 chromeos::CrosSettingsProvider::PERMANENTLY_UNTRUSTED);
120 // Roaming is disabled as we can't determine the correct setting. 116 // Roaming is disabled as we can't determine the correct setting.
121 } 117 }
122 118
123 network_device_handler_->SetCellularAllowRoaming(data_roaming_setting); 119 network_device_handler_->SetCellularAllowRoaming(data_roaming_setting);
124 } 120 }
125 121
126 } // namespace policy 122 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698