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

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

Issue 582833005: Save password infobar should only work on schemes on which the bubble does (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Vaclav's review comments 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
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..97ef8d3f3c18c68a6fbb19761de2ecc18e06870b 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -10,6 +10,7 @@
#include "base/metrics/histogram.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/browsing_data/browsing_data_helper.h"
#include "chrome/browser/password_manager/password_manager_util.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/password_manager/save_password_infobar_delegate.h"
@@ -150,6 +151,14 @@ void ChromePasswordManagerClient::AutofillResultsComputed() {
void ChromePasswordManagerClient::PromptUserToSavePassword(
scoped_ptr<password_manager::PasswordFormManager> form_to_save) {
+ // Save password infobar and the password bubble prompts only in case of
+ // web scheme URLs and DO NOT prompt in case of URLs with schemes like file:
vabr (Chromium) 2014/09/25 11:07:27 optional nit: I think the patch set 2 version of t
Sunil Ratnu 2014/09/25 11:39:40 Done.
+ // and schemes like 'chrome-extension'
vabr (Chromium) 2014/09/25 11:07:27 nit: Whatever comment you choose, please end it wi
Sunil Ratnu 2014/09/25 11:39:40 Done.
+ if (!BrowsingDataHelper::IsWebScheme(
+ web_contents()->GetLastCommittedURL().scheme())) {
+ return;
+ }
+
if (IsTheHotNewBubbleUIEnabled()) {
ManagePasswordsUIController* manage_passwords_ui_controller =
ManagePasswordsUIController::FromWebContents(web_contents());

Powered by Google App Engine
This is Rietveld 408576698