Home | History | Annotate | Download | only in passwords
      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.
      4 
      5 #include "chrome/browser/ui/views/passwords/save_password_refusal_combobox_model.h"
      6 
      7 #include "grit/generated_resources.h"
      8 #include "ui/base/l10n/l10n_util.h"
      9 
     10 SavePasswordRefusalComboboxModel::SavePasswordRefusalComboboxModel() {
     11   items_.push_back(
     12       l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_CANCEL_BUTTON));
     13   items_.push_back(
     14       l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_BLACKLIST_BUTTON));
     15 }
     16 
     17 SavePasswordRefusalComboboxModel::~SavePasswordRefusalComboboxModel() {}
     18 
     19 int SavePasswordRefusalComboboxModel::GetItemCount() const {
     20   return items_.size();
     21 }
     22 
     23 base::string16 SavePasswordRefusalComboboxModel::GetItemAt(int index) {
     24   return items_[index];
     25 }
     26 
     27 bool SavePasswordRefusalComboboxModel::IsItemSeparatorAt(int index) {
     28   return items_[index].empty();
     29 }
     30 
     31 int SavePasswordRefusalComboboxModel::GetDefaultIndex() const {
     32   return 0;
     33 }
     34