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 {
23 base::string16
AccountChooserMoreComboboxModel::GetItemAt(int index
) {
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
);
34 return l10n_util::GetStringUTF16(
35 IDS_CREDENTIAL_MANAGEMENT_ACCOUNT_CHOOSER_PASSWORDS_LINK
);
39 bool AccountChooserMoreComboboxModel::IsItemSeparatorAt(int index
) {
43 int AccountChooserMoreComboboxModel::GetDefaultIndex() const {
47 bool AccountChooserMoreComboboxModel::IsItemEnabledAt(int index
) const {