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

Side by Side Diff: ui/base/models/simple_combobox_model.cc

Issue 330443004: Bug fix: Translate: leak of a ComboboxModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky's review (2) 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
« no previous file with comments | « ui/base/models/simple_combobox_model.h ('k') | ui/base/ui_base.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/base/models/simple_combobox_model.h"
6
7 namespace ui {
8
9 SimpleComboboxModel::SimpleComboboxModel(
10 const std::vector<base::string16>& items)
11 : items_(items) {
12 }
13
14 SimpleComboboxModel::~SimpleComboboxModel() {
15 }
16
17 int SimpleComboboxModel::GetItemCount() const {
18 return items_.size();
19 }
20
21 base::string16 SimpleComboboxModel::GetItemAt(int index) {
22 return items_[index];
23 }
24
25 bool SimpleComboboxModel::IsItemSeparatorAt(int index) {
26 return items_[index].empty();
27 }
28
29 int SimpleComboboxModel::GetDefaultIndex() const {
30 return 0;
31 }
32
33 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/models/simple_combobox_model.h ('k') | ui/base/ui_base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698