Index: components/autofill/content/browser/wallet/wallet_service_url.cc |
diff --git a/components/autofill/content/browser/wallet/wallet_service_url.cc b/components/autofill/content/browser/wallet/wallet_service_url.cc |
index 5c45cf555e8a23f184ccd2ca84a5ef1758fb0a51..5049e7960b1e5f27135e2978b752f53098762086 100644 |
--- a/components/autofill/content/browser/wallet/wallet_service_url.cc |
+++ b/components/autofill/content/browser/wallet/wallet_service_url.cc |
@@ -141,7 +141,7 @@ GURL GetPassiveAuthUrl(size_t user_index) { |
.Resolve("passiveauth?isChromePayments=true"); |
} |
-GURL GetSignInUrl() { |
+GURL GetAddAccountUrl() { |
GURL url(GaiaUrls::GetInstance()->add_account_url()); |
url = net::AppendQueryParameter(url, "nui", "1"); |
// Prevents promos from showing (see http://crbug.com/235227). |
@@ -152,6 +152,17 @@ GURL GetSignInUrl() { |
return url; |
} |
+GURL GetSignInUrl(size_t user_index) { |
+ GURL url(GaiaUrls::GetInstance()->service_login_url()); |
+ url = net::AppendQueryParameter( |
+ url, "authuser", base::SizeTToString(user_index)); |
+ // Prevents promos from showing (see http://crbug.com/235227). |
+ url = net::AppendQueryParameter(url, "sarp", "1"); |
+ url = |
+ net::AppendQueryParameter(url, "continue", GetSignInContinueUrl().spec()); |
+ return url; |
+} |
+ |
// The continue url portion of the sign-in URL. This URL is used as a milestone |
// to determine that the sign-in process is finished. It has to be a Google |
// domain, use https://, and do almost nothing, but otherwise it's not too |
@@ -187,11 +198,11 @@ bool IsSignInContinueUrl(const GURL& url, size_t* user_index) { |
bool IsSignInRelatedUrl(const GURL& url) { |
size_t unused; |
- return url.GetOrigin() == GetSignInUrl().GetOrigin() || |
- StartsWith(base::UTF8ToUTF16(url.GetOrigin().host()), |
- base::ASCIIToUTF16("accounts."), |
- false) || |
- IsSignInContinueUrl(url, &unused); |
+ return url.GetOrigin() == GetAddAccountUrl().GetOrigin() || |
+ StartsWith(base::UTF8ToUTF16(url.GetOrigin().host()), |
+ base::ASCIIToUTF16("accounts."), |
+ false) || |
+ IsSignInContinueUrl(url, &unused); |
} |
bool IsUsingProd() { |