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

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

Issue 742513006: Add ManagementMode enum and GetManagementMode(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 0d29b314f2d7fade20819c97c47b3489d65a3849..a643fd529717b0b9db35ca472c65fcb36a7abfac 100644
--- a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc
@@ -50,16 +50,14 @@ namespace policy {
namespace {
// Creates and initializes a cloud policy client. Returns NULL if the device
-// doesn't have credentials in device settings (i.e. is not
-// enterprise-enrolled).
+// is not enterprise-enrolled.
scoped_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 ||
- !policy_data->has_request_token() ||
- !policy_data->has_device_id() ||
+ GetManagementMode(*policy_data) != MANAGEMENT_MODE_ENTERPRISE ||
!device_management_service) {
return scoped_ptr<CloudPolicyClient>();
}

Powered by Google App Engine
This is Rietveld 408576698