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

Side by Side Diff: chrome/browser/ui/views/cookie_info_view.cc

Issue 9838092: ui/base/models: Make ComboboxModel::GetItemCount() a constant function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_rel and reland Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/cookie_info_view.h ('k') | chrome/browser/ui/views/uninstall_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/cookie_info_view.h" 5 #include "chrome/browser/ui/views/cookie_info_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void CookieInfoView::ItemChanged(views::Combobox* combo_box, 138 void CookieInfoView::ItemChanged(views::Combobox* combo_box,
139 int prev_index, 139 int prev_index,
140 int new_index) { 140 int new_index) {
141 DCHECK(combo_box == expires_value_combobox_); 141 DCHECK(combo_box == expires_value_combobox_);
142 if (delegate_) 142 if (delegate_)
143 delegate_->ModifyExpireDate(new_index != 0); 143 delegate_->ModifyExpireDate(new_index != 0);
144 } 144 }
145 145
146 /////////////////////////////////////////////////////////////////////////////// 146 ///////////////////////////////////////////////////////////////////////////////
147 // CookieInfoView, ui::ComboboxModel overrides. 147 // CookieInfoView, ui::ComboboxModel overrides.
148 int CookieInfoView::GetItemCount() { 148 int CookieInfoView::GetItemCount() const {
149 return static_cast<int>(expire_combo_values_.size()); 149 return static_cast<int>(expire_combo_values_.size());
150 } 150 }
151 151
152 string16 CookieInfoView::GetItemAt(int index) { 152 string16 CookieInfoView::GetItemAt(int index) {
153 return expire_combo_values_[index]; 153 return expire_combo_values_[index];
154 } 154 }
155 155
156 void CookieInfoView::AddLabelRow(int layout_id, views::GridLayout* layout, 156 void CookieInfoView::AddLabelRow(int layout_id, views::GridLayout* layout,
157 views::View* label, views::View* value) { 157 views::View* label, views::View* value) {
158 layout->StartRow(0, layout_id); 158 layout->StartRow(0, layout_id);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 send_for_value_field_->SetBackgroundColor(text_area_background); 274 send_for_value_field_->SetBackgroundColor(text_area_background);
275 created_value_field_->SetReadOnly(true); 275 created_value_field_->SetReadOnly(true);
276 created_value_field_->RemoveBorder(); 276 created_value_field_->RemoveBorder();
277 created_value_field_->SetBackgroundColor(text_area_background); 277 created_value_field_->SetBackgroundColor(text_area_background);
278 if (expires_value_field_) { 278 if (expires_value_field_) {
279 expires_value_field_->SetReadOnly(true); 279 expires_value_field_->SetReadOnly(true);
280 expires_value_field_->RemoveBorder(); 280 expires_value_field_->RemoveBorder();
281 expires_value_field_->SetBackgroundColor(text_area_background); 281 expires_value_field_->SetBackgroundColor(text_area_background);
282 } 282 }
283 } 283 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/cookie_info_view.h ('k') | chrome/browser/ui/views/uninstall_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698