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

Side by Side Diff: chrome/browser/views/options/general_page_view.cc

Issue 18076: request review: fix issue 2821 and 6132 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/options/general_page_view.h" 5 #include "chrome/browser/views/options/general_page_view.h"
6 6
7 #include "base/gfx/png_decoder.h" 7 #include "base/gfx/png_decoder.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 return urls; 293 return urls;
294 } 294 }
295 295
296 int CustomHomePagesTableModel::RowCount() { 296 int CustomHomePagesTableModel::RowCount() {
297 return static_cast<int>(entries_.size()); 297 return static_cast<int>(entries_.size());
298 } 298 }
299 299
300 std::wstring CustomHomePagesTableModel::GetText(int row, int column_id) { 300 std::wstring CustomHomePagesTableModel::GetText(int row, int column_id) {
301 DCHECK(column_id == 0); 301 DCHECK(column_id == 0);
302 DCHECK(row >= 0 && row < RowCount()); 302 DCHECK(row >= 0 && row < RowCount());
303 // No need to force URL to have LTR directionality because the custom home
304 // pages control is created using LTR directionality.
303 return UTF8ToWide(entries_[row].url.spec()); 305 return UTF8ToWide(entries_[row].url.spec());
304 } 306 }
305 307
306 SkBitmap CustomHomePagesTableModel::GetIcon(int row) { 308 SkBitmap CustomHomePagesTableModel::GetIcon(int row) {
307 DCHECK(row >= 0 && row < RowCount()); 309 DCHECK(row >= 0 && row < RowCount());
308 if (!entries_[row].icon.isNull()) 310 if (!entries_[row].icon.isNull())
309 return entries_[row].icon; 311 return entries_[row].icon;
310 return default_favicon_; 312 return default_favicon_;
311 } 313 }
312 314
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 homepage_use_url_textfield_->SetReadOnly(true); 1081 homepage_use_url_textfield_->SetReadOnly(true);
1080 } 1082 }
1081 } 1083 }
1082 1084
1083 void GeneralPageView::SetDefaultSearchProvider() { 1085 void GeneralPageView::SetDefaultSearchProvider() {
1084 const int index = default_search_engine_combobox_->GetSelectedItem(); 1086 const int index = default_search_engine_combobox_->GetSelectedItem();
1085 default_search_engines_model_->model()->SetDefaultSearchProvider( 1087 default_search_engines_model_->model()->SetDefaultSearchProvider(
1086 default_search_engines_model_->GetTemplateURLAt(index)); 1088 default_search_engines_model_->GetTemplateURLAt(index));
1087 } 1089 }
1088 1090
OLDNEW
« no previous file with comments | « chrome/browser/views/options/cookies_view.cc ('k') | chrome/browser/views/password_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698