Index: chrome/browser/chromeos/login/auth/chrome_login_performer.cc |
diff --git a/chrome/browser/chromeos/login/auth/chrome_login_performer.cc b/chrome/browser/chromeos/login/auth/chrome_login_performer.cc |
index e912445898288b10383a7b6267ed449bb75b9c89..47353c4606a71fc4ff3535b2813d45a572695d1b 100644 |
--- a/chrome/browser/chromeos/login/auth/chrome_login_performer.cc |
+++ b/chrome/browser/chromeos/login/auth/chrome_login_performer.cc |
@@ -84,13 +84,13 @@ void ChromeLoginPerformer::DidRunTrustedCheck(const base::Closure& callback) { |
} |
} |
-bool ChromeLoginPerformer::IsUserWhitelisted(const std::string& user_id, |
+bool ChromeLoginPerformer::IsUserWhitelisted(const AccountId& account_id, |
bool* wildcard_match) { |
- return CrosSettings::IsWhitelisted(user_id, wildcard_match); |
+ return CrosSettings::IsWhitelisted(account_id.GetUserEmail(), wildcard_match); |
} |
void ChromeLoginPerformer::RunOnlineWhitelistCheck( |
- const std::string& user_id, |
+ const AccountId& account_id, |
bool wildcard_match, |
const std::string& refresh_token, |
const base::Closure& success_callback, |
@@ -99,7 +99,7 @@ void ChromeLoginPerformer::RunOnlineWhitelistCheck( |
policy::BrowserPolicyConnectorChromeOS* connector = |
g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
if (connector->IsEnterpriseManaged() && wildcard_match && |
- !connector->IsNonEnterpriseUser(user_id)) { |
+ !connector->IsNonEnterpriseUser(account_id.GetUserEmail())) { |
wildcard_login_checker_.reset(new policy::WildcardLoginChecker()); |
if (refresh_token.empty()) { |
wildcard_login_checker_->StartWithSigninContext( |
@@ -143,27 +143,27 @@ UserContext ChromeLoginPerformer::TransformSupervisedKey( |
return authentication->TransformKey(context); |
} |
-void ChromeLoginPerformer::SetupSupervisedUserFlow(const std::string& user_id) { |
- SupervisedUserLoginFlow* new_flow = new SupervisedUserLoginFlow(user_id); |
- new_flow->SetHost(ChromeUserManager::Get() |
- ->GetUserFlow(AccountId::FromUserEmail(user_id)) |
- ->host()); |
- ChromeUserManager::Get()->SetUserFlow(AccountId::FromUserEmail(user_id), |
- new_flow); |
+void ChromeLoginPerformer::SetupSupervisedUserFlow( |
+ const AccountId& account_id) { |
+ SupervisedUserLoginFlow* new_flow = new SupervisedUserLoginFlow(account_id); |
+ new_flow->SetHost(ChromeUserManager::Get()->GetUserFlow(account_id)->host()); |
+ ChromeUserManager::Get()->SetUserFlow(account_id, new_flow); |
} |
-void ChromeLoginPerformer::SetupEasyUnlockUserFlow(const std::string& user_id) { |
- ChromeUserManager::Get()->SetUserFlow(AccountId::FromUserEmail(user_id), |
- new EasyUnlockUserLoginFlow(user_id)); |
+void ChromeLoginPerformer::SetupEasyUnlockUserFlow( |
+ const AccountId& account_id) { |
+ ChromeUserManager::Get()->SetUserFlow( |
+ account_id, new EasyUnlockUserLoginFlow(account_id)); |
} |
-bool ChromeLoginPerformer::CheckPolicyForUser(const std::string& user_id) { |
+bool ChromeLoginPerformer::CheckPolicyForUser(const AccountId& account_id) { |
// Login is not allowed if policy could not be loaded for the account. |
policy::BrowserPolicyConnectorChromeOS* connector = |
g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
policy::DeviceLocalAccountPolicyService* policy_service = |
connector->GetDeviceLocalAccountPolicyService(); |
- return policy_service && policy_service->IsPolicyAvailableForUser(user_id); |
+ return policy_service && |
+ policy_service->IsPolicyAvailableForUser(account_id.GetUserEmail()); |
} |
//////////////////////////////////////////////////////////////////////////////// |
// ChromeLoginPerformer, private: |