Index: chrome/browser/password_manager/chrome_password_manager_client.cc |
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc |
index c5c50bf4136126177d73dbf711fad41cdcd6e35e..777d4ba11ff70edd8ce2c261b8d9c6391708b7ce 100644 |
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc |
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc |
@@ -92,9 +92,6 @@ bool ChromePasswordManagerClient::IsAutomaticPasswordSavingEnabled() const { |
bool ChromePasswordManagerClient::IsPasswordManagerEnabledForCurrentPage() |
const { |
- if (EnabledForSyncSignin()) |
- return true; |
- |
DCHECK(web_contents()); |
content::NavigationEntry* entry = |
web_contents()->GetController().GetLastCommittedEntry(); |
@@ -102,6 +99,14 @@ bool ChromePasswordManagerClient::IsPasswordManagerEnabledForCurrentPage() |
// TODO(gcasto): Determine if fix for crbug.com/388246 is relevant here. |
return true; |
} |
+ |
+ // Disable the password manager for online password management. |
+ if (IsURLPasswordWebsiteReauth(entry->GetURL())) |
+ return false; |
+ |
+ if (EnabledForSyncSignin()) |
+ return true; |
+ |
// Do not fill nor save password when a user is signing in for sync. This |
// is because users need to remember their password if they are syncing as |
// this is effectively their master password. |
@@ -403,6 +408,25 @@ bool ChromePasswordManagerClient::LastLoadWasTransactionalReauthPage() const { |
&ignored_value); |
} |
+bool ChromePasswordManagerClient::IsURLPasswordWebsiteReauth(GURL url) const { |
+ if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin()) |
+ return false; |
+ |
+ // "rart" param signals this page is for transactional reauth. |
jww
2014/08/22 22:42:10
Seems like this might be worth factoring out as a
Garrett Casto
2014/08/25 08:16:49
I'm not sure. I could imagine it possibly going in
|
+ std::string param_value; |
+ if (!net::GetValueForKeyInQuery(url, "rart", ¶m_value)) |
+ return false; |
+ |
+ // Check the "continue" param to see if this reauth page is for the passwords |
+ // website. |
+ param_value.clear(); |
+ if (!net::GetValueForKeyInQuery(url, "continue", ¶m_value)) |
+ return false; |
+ |
+ return GURL(param_value).GetOrigin() == |
Mike West
2014/08/24 05:37:57
If a user changes the value of the continue param
Garrett Casto
2014/08/25 08:16:49
Ah, interesting. I assumed that the server side ch
|
+ GURL(chrome::kPasswordManagerAccountDashboardURL).GetOrigin(); |
+} |
+ |
bool ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled() { |
#if !defined(USE_AURA) |
return false; |