OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |