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

Unified Diff: chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc

Issue 1256283002: GAIA ID migration for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 3 months 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/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 a73af22a7e193f6f5602479b21df8cf9822b55f9..ae35fd9dec2202dff2b83838b69bd5d8fba77473 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)

Powered by Google App Engine
This is Rietveld 408576698