Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: chrome/browser/ui/translate/translate_denial_combobox_model.h

Issue 330443004: Bug fix: Translate: leak of a ComboboxModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the order of the member variables Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_COMBOBOX_MODEL_H_
6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_COMBOBOX_MODEL_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "ui/base/models/combobox_model.h"
12
13 class TranslateDenialComboboxModel : public ui::ComboboxModel {
sky 2014/06/17 16:30:38 How about a SimpleComboboxModel in ui/base/models
hajimehoshi 2014/06/18 08:33:37 Done.
14 public:
15 enum {
sky 2014/06/17 16:30:38 Generally we use C++ style for enums.
hajimehoshi 2014/06/18 08:33:37 Done.
16 INDEX_NOPE = 0,
17 INDEX_NEVER_TRANSLATE_LANGUAGE = 2,
18 INDEX_NEVER_TRANSLATE_SITE = 4,
19 };
20
21 explicit TranslateDenialComboboxModel(
22 const base::string16& original_language_name);
23 virtual ~TranslateDenialComboboxModel();
24
25 private:
26 // Overridden from ui::ComboboxModel:
27 virtual int GetItemCount() const OVERRIDE;
28 virtual base::string16 GetItemAt(int index);
29 virtual bool IsItemSeparatorAt(int index);
30 virtual int GetDefaultIndex() const;
31
32 std::vector<base::string16> items_;
33
34 DISALLOW_COPY_AND_ASSIGN(TranslateDenialComboboxModel);
35 };
36
37 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_COMBOBOX_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698