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

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

Issue 438493002: Added ConsumerManagementService class to handle enroll state and device owner info in boot lockbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@signin
Patch Set: Fixed the broken test. Created 6 years, 4 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 (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);
184 } 182 }
185 183
186 // static 184 // static
187 std::string DeviceCloudPolicyManagerChromeOS::GetMachineID() { 185 std::string DeviceCloudPolicyManagerChromeOS::GetMachineID() {
188 std::string machine_id; 186 std::string machine_id;
189 chromeos::system::StatisticsProvider* provider = 187 chromeos::system::StatisticsProvider* provider =
190 chromeos::system::StatisticsProvider::GetInstance(); 188 chromeos::system::StatisticsProvider::GetInstance();
191 for (size_t i = 0; i < arraysize(kMachineInfoSerialNumberKeys); i++) { 189 for (size_t i = 0; i < arraysize(kMachineInfoSerialNumberKeys); i++) {
192 if (provider->GetMachineStatistic(kMachineInfoSerialNumberKeys[i], 190 if (provider->GetMachineStatistic(kMachineInfoSerialNumberKeys[i],
193 &machine_id) && 191 &machine_id) &&
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 local_state_->SetBoolean( 255 local_state_->SetBoolean(
258 prefs::kDeviceEnrollmentCanExit, 256 prefs::kDeviceEnrollmentCanExit,
259 GetMachineFlag(chromeos::system::kOemCanExitEnterpriseEnrollmentKey, 257 GetMachineFlag(chromeos::system::kOemCanExitEnterpriseEnrollmentKey,
260 false)); 258 false));
261 } 259 }
262 } 260 }
263 } 261 }
264 } 262 }
265 263
266 } // namespace policy 264 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/consumer_management_service_unittest.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698