Chromium Code Reviews| 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 c5397635cdb1328564dc7b4029ab3e14278c88ee..8a68a76221df7478a63fed5d33208b666558d201 100644 |
| --- a/components/autofill/content/browser/wallet/wallet_service_url.cc |
| +++ b/components/autofill/content/browser/wallet/wallet_service_url.cc |
| @@ -10,8 +10,11 @@ |
| #include "base/format_macros.h" |
| #include "base/metrics/field_trial.h" |
| #include "base/strings/string_number_conversions.h" |
| +#include "base/strings/string_util.h" |
| #include "base/strings/stringprintf.h" |
| +#include "base/strings/utf_string_conversions.h" |
| #include "components/autofill/core/common/autofill_switches.h" |
| +#include "content/public/common/url_constants.h" |
| #include "google_apis/gaia/gaia_urls.h" |
| #include "net/base/url_util.h" |
| #include "url/gurl.h" |
| @@ -154,8 +157,8 @@ GURL GetSignInContinueUrl() { |
| } |
| bool IsSignInContinueUrl(const GURL& url, size_t* user_index) { |
| - GURL final_url = wallet::GetSignInContinueUrl(); |
| - if (!url.SchemeIsSecure() || |
| + GURL final_url = GetSignInContinueUrl(); |
| + if (url.scheme() != final_url.scheme() || |
| url.host() != final_url.host() || |
| url.path() != final_url.path()) { |
| return false; |
| @@ -179,7 +182,12 @@ bool IsSignInContinueUrl(const GURL& url, size_t* user_index) { |
| } |
| bool IsSignInRelatedUrl(const GURL& url) { |
| - return url.GetOrigin() == GetSignInUrl().GetOrigin(); |
| + size_t unused; |
| + return url.GetOrigin() == GetSignInUrl().GetOrigin() || |
| + StartsWith(base::UTF8ToUTF16(url.GetOrigin().spec()), |
|
Evan Stade
2014/01/03 01:47:44
new change
groby-ooo-7-16
2014/01/03 18:54:49
Ah. Here's the bug - you want to use Host(), not s
|
| + base::ASCIIToUTF16("accounts."), |
| + false) || |
| + IsSignInContinueUrl(url, &unused); |
| } |
| bool IsUsingProd() { |