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

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: 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 | no next file » | 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..a79760c299a73127ab320bed25eccc8f654220e3 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"
@@ -154,7 +155,10 @@ void ChromePasswordManagerClient::PromptUserToSavePassword(
ManagePasswordsUIController* manage_passwords_ui_controller =
ManagePasswordsUIController::FromWebContents(web_contents());
manage_passwords_ui_controller->OnPasswordSubmitted(form_to_save.Pass());
- } else {
+ } else if (BrowsingDataHelper::IsWebScheme(
vabr (Chromium) 2014/09/19 13:18:10 While this will solve the current issue, please co
Sunil Ratnu 2014/09/24 15:15:37 Done.
+ web_contents()->GetLastCommittedURL().scheme())) {
+ // Save password infobar should only work on schemes on which the bubble
+ // does (in particular, should not work on file://)
std::string uma_histogram_suffix(
password_manager::metrics_util::GroupIdToString(
password_manager::metrics_util::MonitoredDomainGroupId(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698