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

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

Issue 98643008: Only allow enabling of ManagePasswordsBubble if USE_AURA or WIN_OS is defined (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@updatebestmatchesmanagepwbubble
Patch Set: update Created 7 years 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/password_manager.cc
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index 735a6c24997f412c212fe2481db1376cc70f5474..ac0e2ca0f223bd7e2577f02c59022232de86630b 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -399,15 +399,21 @@ void PasswordManager::OnPasswordFormsRendered(
UMA_HISTOGRAM_COUNTS("PasswordGeneration.Submitted", 1);
if (ShouldShowSavePasswordInfoBar()) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ #if defined(USE_AURA) || defined(OS_WIN)
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSavePasswordBubble)) {
- NotifyPasswordObserver(PasswordObserver::SAVE_NEW_PASSWORD,
- provisional_save_manager_->best_matches(),
- provisional_save_manager_->pending_credentials());
- } else {
+ NotifyPasswordObserver(
+ PasswordObserver::SAVE_NEW_PASSWORD,
+ provisional_save_manager_->best_matches(),
+ provisional_save_manager_->pending_credentials());
+ } else {
+ delegate_->AddSavePasswordInfoBarIfPermitted(
+ provisional_save_manager_.release());
+ }
+ #else
delegate_->AddSavePasswordInfoBarIfPermitted(
provisional_save_manager_.release());
- }
+ #endif
} else {
provisional_save_manager_->Save();
provisional_save_manager_.reset();
@@ -485,11 +491,13 @@ void PasswordManager::Autofill(
break;
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableSavePasswordBubble)) {
- NotifyPasswordObserver(PasswordObserver::AUTOFILL_PASSWORDS, best_matches,
- form_for_autofill);
- }
+ #if defined(USE_AURA) || defined(OS_WIN)
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableSavePasswordBubble)) {
+ NotifyPasswordObserver(PasswordObserver::AUTOFILL_PASSWORDS, best_matches,
+ form_for_autofill);
+ }
+ #endif
}
void PasswordManager::UpdateBestMatches(
« 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