Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / passwords / save_password_refusal_combobox_model.cc
blobf826de73a0815b169e1dc010c3800f726e4660f6
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/passwords/save_password_refusal_combobox_model.h"
7 #include "chrome/grit/generated_resources.h"
8 #include "ui/base/l10n/l10n_util.h"
10 SavePasswordRefusalComboboxModel::SavePasswordRefusalComboboxModel(
11 bool never_is_default)
12 : never_is_default_(never_is_default) {
13 #if !defined(OS_ANDROID)
14 items_.push_back(
15 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_CANCEL_BUTTON));
16 items_.push_back(
17 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_BLACKLIST_BUTTON));
18 if (never_is_default)
19 swap(items_[0], items_[1]);
20 #endif
23 SavePasswordRefusalComboboxModel::~SavePasswordRefusalComboboxModel() {}
25 int SavePasswordRefusalComboboxModel::GetItemCount() const {
26 return items_.size();
29 base::string16 SavePasswordRefusalComboboxModel::GetItemAt(int index) {
30 return items_[index];
33 bool SavePasswordRefusalComboboxModel::IsItemSeparatorAt(int index) {
34 return items_[index].empty();
37 int SavePasswordRefusalComboboxModel::GetDefaultIndex() const {
38 return 0;