Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / passwords / account_chooser_more_combobox_model.cc
bloba0c021dd2483f56308c759827b98a945e360eda3
1 // Copyright 2015 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/account_chooser_more_combobox_model.h"
7 #include "base/logging.h"
8 #include "chrome/grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h"
11 const int AccountChooserMoreComboboxModel::INDEX_MORE = 0;
12 const int AccountChooserMoreComboboxModel::INDEX_LEARN_MORE = 1;
13 const int AccountChooserMoreComboboxModel::INDEX_SETTINGS = 2;
15 AccountChooserMoreComboboxModel::AccountChooserMoreComboboxModel() = default;
17 AccountChooserMoreComboboxModel::~AccountChooserMoreComboboxModel() = default;
19 int AccountChooserMoreComboboxModel::GetItemCount() const {
20 return 3;
23 base::string16 AccountChooserMoreComboboxModel::GetItemAt(int index) {
24 switch (index) {
25 default:
26 NOTREACHED();
27 case INDEX_MORE:
28 return l10n_util::GetStringUTF16(
29 IDS_CREDENTIAL_MANAGEMENT_ACCOUNT_CHOOSER_MORE);
30 case INDEX_LEARN_MORE:
31 return l10n_util::GetStringUTF16(
32 IDS_CREDENTIAL_MANAGEMENT_ACCOUNT_CHOOSER_LEARN_MORE);
33 case INDEX_SETTINGS:
34 return l10n_util::GetStringUTF16(
35 IDS_CREDENTIAL_MANAGEMENT_ACCOUNT_CHOOSER_PASSWORDS_LINK);
39 bool AccountChooserMoreComboboxModel::IsItemSeparatorAt(int index) {
40 return false;
43 int AccountChooserMoreComboboxModel::GetDefaultIndex() const {
44 return 0;
47 bool AccountChooserMoreComboboxModel::IsItemEnabledAt(int index) const {
48 return true;