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

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: Addresing Markus' comments II 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 f165660610f0433a4c1db1935928db2e55e76958..f1373e1bf9534e8e288970f26d31c9082c3c6e7c 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -364,15 +364,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());
+ } {
markusheintz_ 2013/12/19 09:25:51 here is an "else" missing.
npentrel 2013/12/19 22:48:10 Done.
+ delegate_->AddSavePasswordInfoBarIfPermitted(
+ provisional_save_manager_.release());
+ }
+ #else
delegate_->AddSavePasswordInfoBarIfPermitted(
provisional_save_manager_.release());
- }
+ #endif
} else {
provisional_save_manager_->Save();
provisional_save_manager_.reset();
@@ -450,11 +456,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