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

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

Issue 718673002: New user type introduced. Combines regular and supervised features. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Logical expression fixed. 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/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
bartfab (slow) 2014/11/27 12:51:50 This is actually out of date. USER_TYPE_KIOSK_APP
+ // 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>();
}

Powered by Google App Engine
This is Rietveld 408576698