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..5b37c41d5174310855f80f7800ef59a0fc366978 100644 |
--- a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc |
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc |
@@ -22,6 +22,7 @@ |
#include "chrome/browser/chromeos/policy/device_local_account.h" |
#include "chrome/browser/chromeos/policy/device_local_account_external_data_service.h" |
#include "chrome/browser/chromeos/policy/device_local_account_policy_store.h" |
+#include "chrome/browser/chromeos/policy/policy_util.h" |
#include "chrome/browser/chromeos/settings/device_settings_service.h" |
#include "chrome/common/chrome_content_client.h" |
#include "chromeos/chromeos_paths.h" |
@@ -50,16 +51,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() || |
+ !PolicyUtil::IsEnterpriseManaged(*policy_data) || |
!device_management_service) { |
return scoped_ptr<CloudPolicyClient>(); |
} |