| Index: chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc
|
| diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc b/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc
|
| index 5db81f8208f1bbb629b70bc1fb9c9831af6c3a08..cc029613d6eb9886821c76015ad1f4e598f46d42 100644
|
| --- a/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc
|
| +++ b/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc
|
| @@ -69,8 +69,9 @@ UserPolicySigninService::~UserPolicySigninService() {}
|
|
|
| void UserPolicySigninService::RegisterForPolicy(
|
| const std::string& username,
|
| + const std::string& account_id,
|
| const PolicyRegistrationCallback& callback) {
|
| - RegisterForPolicyInternal(username, "", callback);
|
| + RegisterForPolicyInternal(username, account_id, "", callback);
|
| }
|
|
|
| #if !defined(OS_ANDROID)
|
| @@ -78,7 +79,7 @@ void UserPolicySigninService::RegisterForPolicyWithAccessToken(
|
| const std::string& username,
|
| const std::string& access_token,
|
| const PolicyRegistrationCallback& callback) {
|
| - RegisterForPolicyInternal(username, access_token, callback);
|
| + RegisterForPolicyInternal(username, "", access_token, callback);
|
| }
|
|
|
| // static
|
| @@ -89,6 +90,7 @@ std::vector<std::string> UserPolicySigninService::GetScopes() {
|
|
|
| void UserPolicySigninService::RegisterForPolicyInternal(
|
| const std::string& username,
|
| + const std::string& account_id,
|
| const std::string& access_token,
|
| const PolicyRegistrationCallback& callback) {
|
| // Create a new CloudPolicyClient for fetching the DMToken.
|
| @@ -109,11 +111,9 @@ void UserPolicySigninService::RegisterForPolicyInternal(
|
|
|
| if (access_token.empty()) {
|
| registration_helper_->StartRegistration(
|
| - oauth2_token_service_,
|
| - username,
|
| + oauth2_token_service_, account_id,
|
| base::Bind(&UserPolicySigninService::CallPolicyRegistrationCallback,
|
| - base::Unretained(this),
|
| - base::Passed(&policy_client),
|
| + base::Unretained(this), base::Passed(&policy_client),
|
| callback));
|
| } else {
|
| #if defined(OS_ANDROID)
|
| @@ -203,8 +203,7 @@ void UserPolicySigninService::RegisterCloudPolicyService() {
|
| policy_manager()->core()->client(),
|
| kCloudPolicyRegistrationType));
|
| registration_helper_->StartRegistration(
|
| - oauth2_token_service_,
|
| - signin_manager()->GetAuthenticatedUsername(),
|
| + oauth2_token_service_, signin_manager()->GetAuthenticatedAccountId(),
|
| base::Bind(&UserPolicySigninService::OnRegistrationDone,
|
| base::Unretained(this)));
|
| }
|
|
|