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

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

Issue 405383002: The consumer management enroll and unenroll buttons should only be visible to the device owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a cross-platform compilation error. Created 6 years, 5 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/resources/options/browser_options.js » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.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 "base/port.h" 10 #include "base/port.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 // static 174 // static
175 void DeviceCloudPolicyManagerChromeOS::RegisterPrefs( 175 void DeviceCloudPolicyManagerChromeOS::RegisterPrefs(
176 PrefRegistrySimple* registry) { 176 PrefRegistrySimple* registry) {
177 registry->RegisterStringPref(prefs::kDeviceEnrollmentRequisition, 177 registry->RegisterStringPref(prefs::kDeviceEnrollmentRequisition,
178 std::string()); 178 std::string());
179 registry->RegisterBooleanPref(prefs::kDeviceEnrollmentAutoStart, false); 179 registry->RegisterBooleanPref(prefs::kDeviceEnrollmentAutoStart, false);
180 registry->RegisterBooleanPref(prefs::kDeviceEnrollmentCanExit, true); 180 registry->RegisterBooleanPref(prefs::kDeviceEnrollmentCanExit, true);
181 registry->RegisterDictionaryPref(prefs::kServerBackedDeviceState); 181 registry->RegisterDictionaryPref(prefs::kServerBackedDeviceState);
182 registry->RegisterBooleanPref(prefs::kConsumerManagementEnrollmentRequested,
183 false);
182 } 184 }
183 185
184 // static 186 // static
185 std::string DeviceCloudPolicyManagerChromeOS::GetMachineID() { 187 std::string DeviceCloudPolicyManagerChromeOS::GetMachineID() {
186 std::string machine_id; 188 std::string machine_id;
187 chromeos::system::StatisticsProvider* provider = 189 chromeos::system::StatisticsProvider* provider =
188 chromeos::system::StatisticsProvider::GetInstance(); 190 chromeos::system::StatisticsProvider::GetInstance();
189 for (size_t i = 0; i < arraysize(kMachineInfoSerialNumberKeys); i++) { 191 for (size_t i = 0; i < arraysize(kMachineInfoSerialNumberKeys); i++) {
190 if (provider->GetMachineStatistic(kMachineInfoSerialNumberKeys[i], 192 if (provider->GetMachineStatistic(kMachineInfoSerialNumberKeys[i],
191 &machine_id) && 193 &machine_id) &&
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 local_state_->SetBoolean( 257 local_state_->SetBoolean(
256 prefs::kDeviceEnrollmentCanExit, 258 prefs::kDeviceEnrollmentCanExit,
257 GetMachineFlag(chromeos::system::kOemCanExitEnterpriseEnrollmentKey, 259 GetMachineFlag(chromeos::system::kOemCanExitEnterpriseEnrollmentKey,
258 false)); 260 false));
259 } 261 }
260 } 262 }
261 } 263 }
262 } 264 }
263 265
264 } // namespace policy 266 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698