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

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

Issue 733953002: Do not save passwords if the landing page has HTTP status 5xx or 4xx (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/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 ab2f0d809b36cca89f7ca3ab0c5df4836e784696..2c3f9a4073ad739c4b772b6ce1a1c7dcfd55460e 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -290,6 +290,18 @@ bool ChromePasswordManagerClient::IsLoggingActive() const {
return can_use_log_router_ && !web_contents()->GetWebUI();
}
+bool ChromePasswordManagerClient::WasLastNavigationHTTPError() const {
+ DCHECK(web_contents());
vabr (Chromium) 2014/11/17 15:32:15 Please create here an instance of BrowserSavePassw
Sunil Ratnu 2014/11/18 06:40:05 Done.
+ content::NavigationEntry* entry =
+ web_contents()->GetController().GetVisibleEntry();
+ if (!entry)
+ return false;
+ int http_status_code = entry->GetHttpStatusCode();
+ if (http_status_code >= 400 && http_status_code <= 600)
vabr (Chromium) 2014/11/17 15:32:15 Please change "<= 600" to "< 600". There does not
Sunil Ratnu 2014/11/18 06:40:05 Done.
+ return true;
+ return false;
+}
+
// static
password_manager::PasswordGenerationManager*
ChromePasswordManagerClient::GetGenerationManagerFromWebContents(

Powered by Google App Engine
This is Rietveld 408576698