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

Unified Diff: chrome/browser/chromeos/policy/device_local_account_policy_service.cc

Issue 2230533002: Delete dead consumer enrollment code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/device_local_account_policy_service.cc
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc
index 0a5becf0d9390c712f6294e7377d8bd0f37b8c4f..dc3ea26c657b49db717d07339163c700f1b1d86e 100644
--- a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc
@@ -51,14 +51,16 @@ namespace policy {
namespace {
// Creates and initializes a cloud policy client. Returns nullptr if the device
-// is not enterprise-enrolled.
+// doesn't have credentials in device settings (i.e. is not
+// enterprise-enrolled).
std::unique_ptr<CloudPolicyClient> CreateClient(
chromeos::DeviceSettingsService* device_settings_service,
DeviceManagementService* device_management_service,
scoped_refptr<net::URLRequestContextGetter> system_request_context) {
const em::PolicyData* policy_data = device_settings_service->policy_data();
if (!policy_data ||
- GetManagementMode(*policy_data) != MANAGEMENT_MODE_ENTERPRISE_MANAGED ||
+ !policy_data->has_request_token() ||
+ !policy_data->has_device_id() ||
!device_management_service) {
return std::unique_ptr<CloudPolicyClient>();
}

Powered by Google App Engine
This is Rietveld 408576698