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

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: Addressing Markus' comments 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..64571fbd198cfcd926e127fc04b13cdda21a0a63 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -364,15 +364,18 @@ 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 {
- delegate_->AddSavePasswordInfoBarIfPermitted(
- provisional_save_manager_.release());
- }
+ NotifyPasswordObserver(
+ PasswordObserver::SAVE_NEW_PASSWORD,
+ provisional_save_manager_->best_matches(),
+ provisional_save_manager_->pending_credentials());
+ } else {
markusheintz_ 2013/12/18 14:49:15 Wrong indentation. Please move two spaces to the l
npentrel 2013/12/18 15:01:10 Done.
+ delegate_->AddSavePasswordInfoBarIfPermitted(
+ provisional_save_manager_.release());
markusheintz_ 2013/12/18 14:49:15 I guess this block should also be non WIN and non
npentrel 2013/12/18 15:01:10 Done.
+ }
+ #endif
} else {
provisional_save_manager_->Save();
provisional_save_manager_.reset();
@@ -450,11 +453,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