| Index: chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
|
| diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
|
| index a7ac0a370cd4cece7873be29539f8c6dc5802634..9a4b8d59be55cdc9b90b2e33e67ff1e3a582b982 100644
|
| --- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
|
| +++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
|
| @@ -33,7 +33,6 @@
|
| #include "components/policy/core/common/cloud/device_management_service.h"
|
| #include "components/user_manager/user.h"
|
| #include "components/user_manager/user_manager.h"
|
| -#include "components/user_manager/user_type.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "net/url_request/url_request_context_getter.h"
|
| #include "policy/policy_constants.h"
|
| @@ -129,15 +128,15 @@ scoped_ptr<UserCloudPolicyManagerChromeOS>
|
| chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
|
| CHECK(user);
|
|
|
| - // Only USER_TYPE_REGULAR users have user cloud policy.
|
| - // USER_TYPE_RETAIL_MODE, USER_TYPE_KIOSK_APP, USER_TYPE_GUEST and
|
| - // USER_TYPE_SUPERVISED are not signed in and can't authenticate the
|
| + // Only users with gaia accounts have user cloud policy.
|
| + // USER_TYPE_RETAIL_MODE, USER_TYPE_KIOSK_APP, USER_TYPE_GUEST
|
| + // and USER_TYPE_SUPERVISED are not signed in and can't authenticate the
|
| // policy registration.
|
| // USER_TYPE_PUBLIC_ACCOUNT gets its policy from the
|
| // DeviceLocalAccountPolicyService.
|
| // Non-managed domains will be skipped by the below check
|
| const std::string& username = user->email();
|
| - if (user->GetType() != user_manager::USER_TYPE_REGULAR ||
|
| + if (!user->HasGaiaAccount() ||
|
| BrowserPolicyConnector::IsNonEnterpriseUser(username)) {
|
| return scoped_ptr<UserCloudPolicyManagerChromeOS>();
|
| }
|
|
|