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

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 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 #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 int SimpleComboboxModel::GetItemCount() const {
15 return items_.size();
16 }
17
18 base::string16 SimpleComboboxModel::GetItemAt(int index) {
19 return items_[index];
20 }
21
22 bool SimpleComboboxModel::IsItemSeparatorAt(int index) {
23 return items_[index].empty();
24 }
25
26 int SimpleComboboxModel::GetDefaultIndex() const {
27 return 0;
28 }
29
30 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698