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