| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/exceptions_page_view.h" | 5 #include "chrome/browser/views/options/exceptions_page_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 /////////////////////////////////////////////////////////////////////////////// | 23 /////////////////////////////////////////////////////////////////////////////// |
| 24 // ExceptionsTableModel | 24 // ExceptionsTableModel |
| 25 ExceptionsTableModel::ExceptionsTableModel(Profile* profile) | 25 ExceptionsTableModel::ExceptionsTableModel(Profile* profile) |
| 26 : PasswordsTableModel(profile) { | 26 : PasswordsTableModel(profile) { |
| 27 } | 27 } |
| 28 | 28 |
| 29 ExceptionsTableModel::~ExceptionsTableModel() { | 29 ExceptionsTableModel::~ExceptionsTableModel() { |
| 30 } | 30 } |
| 31 | 31 |
| 32 std::wstring ExceptionsTableModel::GetText(int row, int col_id) { | 32 string16 ExceptionsTableModel::GetText(int row, int col_id) { |
| 33 DCHECK_EQ(col_id, IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN); | 33 DCHECK_EQ(col_id, IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN); |
| 34 return PasswordsTableModel::GetText(row, col_id); | 34 return PasswordsTableModel::GetText(row, col_id); |
| 35 } | 35 } |
| 36 | 36 |
| 37 int ExceptionsTableModel::CompareValues(int row1, int row2, | 37 int ExceptionsTableModel::CompareValues(int row1, int row2, |
| 38 int col_id) { | 38 int col_id) { |
| 39 DCHECK_EQ(col_id, IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN); | 39 DCHECK_EQ(col_id, IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN); |
| 40 return PasswordsTableModel::CompareValues(row1, row2, col_id); | 40 return PasswordsTableModel::CompareValues(row1, row2, col_id); |
| 41 } | 41 } |
| 42 | 42 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 columns.back().sortable = true; | 184 columns.back().sortable = true; |
| 185 table_view_ = new views::TableView(&table_model_, columns, views::TEXT_ONLY, | 185 table_view_ = new views::TableView(&table_model_, columns, views::TEXT_ONLY, |
| 186 true, true, true); | 186 true, true, true); |
| 187 // Make the table initially sorted by host. | 187 // Make the table initially sorted by host. |
| 188 views::TableView::SortDescriptors sort; | 188 views::TableView::SortDescriptors sort; |
| 189 sort.push_back(views::TableView::SortDescriptor( | 189 sort.push_back(views::TableView::SortDescriptor( |
| 190 IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN, true)); | 190 IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN, true)); |
| 191 table_view_->SetSortDescriptors(sort); | 191 table_view_->SetSortDescriptors(sort); |
| 192 table_view_->SetObserver(this); | 192 table_view_->SetObserver(this); |
| 193 } | 193 } |
| OLD | NEW |