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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 604563003: [Password Manager] Disable autofilling for testing password websites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4e10e36222734b65fa73689df8d319098249b543..d898a3a028c07d2553ae64c7f5a5b696c0f07969 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -39,6 +39,7 @@
#include "content/public/browser/web_contents.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/url_util.h"
+#include "third_party/re2/re2/re2.h"
#if defined(OS_ANDROID)
#include "chrome/browser/android/password_authentication_manager.h"
@@ -480,8 +481,11 @@ bool ChromePasswordManagerClient::IsURLPasswordWebsiteReauth(
if (!net::GetValueForKeyInQuery(url, "continue", &param_value))
return false;
- return GURL(param_value).host() ==
- GURL(chrome::kPasswordManagerAccountDashboardURL).host();
+ // All password sites, including test sites, have autofilling disabled.
+ CR_DEFINE_STATIC_LOCAL(RE2, account_dashboard_pattern,
+ ("passwords(-([a-z]+\\.corp))?\\.google\\.com"));
Mike West 2014/09/25 08:26:19 Only google.com? Or do we need to account for othe
Garrett Casto 2014/09/25 22:17:03 Only google.com. This will not be on other TLDs.
+
+ return RE2::FullMatch(GURL(param_value).host(), account_dashboard_pattern);
}
bool ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled() {
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698