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

Unified Diff: chrome/browser/ui/passwords/save_password_refusal_combobox_model.cc

Issue 1022843003: New smart passsword bubble algorithm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle 'Never' correctly Created 5 years, 9 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/ui/passwords/save_password_refusal_combobox_model.cc
diff --git a/chrome/browser/ui/passwords/save_password_refusal_combobox_model.cc b/chrome/browser/ui/passwords/save_password_refusal_combobox_model.cc
index 8d397ee2f034a06b9aaf4edcff4ccd8ca22f4d75..f826de73a0815b169e1dc010c3800f726e4660f6 100644
--- a/chrome/browser/ui/passwords/save_password_refusal_combobox_model.cc
+++ b/chrome/browser/ui/passwords/save_password_refusal_combobox_model.cc
@@ -7,12 +7,16 @@
#include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-SavePasswordRefusalComboboxModel::SavePasswordRefusalComboboxModel() {
+SavePasswordRefusalComboboxModel::SavePasswordRefusalComboboxModel(
+ bool never_is_default)
+ : never_is_default_(never_is_default) {
#if !defined(OS_ANDROID)
items_.push_back(
l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_CANCEL_BUTTON));
items_.push_back(
l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_BLACKLIST_BUTTON));
+ if (never_is_default)
+ swap(items_[0], items_[1]);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698