summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-25 20:13:54 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-25 20:13:54 +0000
commit19dc5d7922dc07b61c037ebbcc86f20dad27eab2 (patch)
treea44771e5a033e7c8b5787afb472055ec15cb9e2a /chrome
parent5affb7e7c6a6f48292d5e5f0bc09e06222244b0b (diff)
downloadchromium_src-19dc5d7922dc07b61c037ebbcc86f20dad27eab2.zip
chromium_src-19dc5d7922dc07b61c037ebbcc86f20dad27eab2.tar.gz
chromium_src-19dc5d7922dc07b61c037ebbcc86f20dad27eab2.tar.bz2
Bound checkingon TableView
Adding bound checking to View <-> Model methods to investigate unit-tests failures. BUG=None TEST=unit-tests should still pass Review URL: http://codereview.chromium.org/2069019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48185 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/keyword_editor_view.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/views/keyword_editor_view.cc b/chrome/browser/views/keyword_editor_view.cc
index 9702cf1..ca0ff9e 100644
--- a/chrome/browser/views/keyword_editor_view.cc
+++ b/chrome/browser/views/keyword_editor_view.cc
@@ -278,13 +278,13 @@ void KeywordEditorView::ButtonPressed(
int last_view_row = -1;
for (views::TableView::iterator i = table_view_->SelectionBegin();
i != table_view_->SelectionEnd(); ++i) {
- last_view_row = table_view_->model_to_view(*i);
+ last_view_row = table_view_->ModelToView(*i);
controller_->RemoveTemplateURL(*i);
}
if (last_view_row >= controller_->table_model()->RowCount())
last_view_row = controller_->table_model()->RowCount() - 1;
if (last_view_row >= 0)
- table_view_->Select(table_view_->view_to_model(last_view_row));
+ table_view_->Select(table_view_->ViewToModel(last_view_row));
} else if (sender == edit_button_) {
const int selected_row = table_view_->FirstSelectedRow();
const TemplateURL* template_url =