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.h
blob49c59cd6a509807a4830edd17257934c771bb760
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 #ifndef CHROME_BROWSER_UI_PASSWORDS_SAVE_PASSWORD_REFUSAL_COMBOBOX_MODEL_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_SAVE_PASSWORD_REFUSAL_COMBOBOX_MODEL_H_
8 #include <vector>
9 #include "base/basictypes.h"
10 #include "base/strings/string16.h"
11 #include "ui/base/models/combobox_model.h"
13 class SavePasswordRefusalComboboxModel : public ui::ComboboxModel {
14 public:
15 explicit SavePasswordRefusalComboboxModel(bool never_is_default);
16 ~SavePasswordRefusalComboboxModel() override;
18 int index_nope() const {
19 return never_is_default_ ? 1 : 0;
22 int index_never() const {
23 return never_is_default_ ? 0 : 1;
26 // Overridden from ui::ComboboxModel:
27 int GetItemCount() const override;
28 base::string16 GetItemAt(int index) override;
29 bool IsItemSeparatorAt(int index) override;
30 int GetDefaultIndex() const override;
32 private:
33 std::vector<base::string16> items_;
34 const bool never_is_default_;
36 DISALLOW_COPY_AND_ASSIGN(SavePasswordRefusalComboboxModel);
40 #endif // CHROME_BROWSER_UI_PASSWORDS_SAVE_PASSWORD_REFUSAL_COMBOBOX_MODEL_H_