diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 21:44:44 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 21:44:44 +0000 |
commit | 521207083178df4dab0ef4de0203d7269a524b82 (patch) | |
tree | a685e517e67c2f7b2859737bad1c7398771ee8fd /chrome/browser/views | |
parent | 11d288907f2fd35ed9c27ef16093bd4f1d8f35ae (diff) | |
download | chromium_src-521207083178df4dab0ef4de0203d7269a524b82.zip chromium_src-521207083178df4dab0ef4de0203d7269a524b82.tar.gz chromium_src-521207083178df4dab0ef4de0203d7269a524b82.tar.bz2 |
More code cleanups found by -Wextra.
(I'm still waiting on a v8 change to turn this on for the whole codebase...)
Review URL: http://codereview.chromium.org/746001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/location_bar_view.cc | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc index b1c8d5b..d52ac39 100644 --- a/chrome/browser/views/location_bar_view.cc +++ b/chrome/browser/views/location_bar_view.cc @@ -1746,15 +1746,13 @@ ExtensionAction* LocationBarView::GetPageAction(size_t index) { } ExtensionAction* LocationBarView::GetVisiblePageAction(size_t index) { - if (index >= 0) { - size_t current = 0; - for (size_t i = 0; i < page_action_views_.size(); ++i) { - if (page_action_views_[i]->IsVisible()) { - if (current == index) - return page_action_views_[i]->image_view()->page_action(); - - ++current; - } + size_t current = 0; + for (size_t i = 0; i < page_action_views_.size(); ++i) { + if (page_action_views_[i]->IsVisible()) { + if (current == index) + return page_action_views_[i]->image_view()->page_action(); + + ++current; } } @@ -1763,17 +1761,15 @@ ExtensionAction* LocationBarView::GetVisiblePageAction(size_t index) { } void LocationBarView::TestPageActionPressed(size_t index) { - if (index >= 0) { - size_t current = 0; - for (size_t i = 0; i < page_action_views_.size(); ++i) { - if (page_action_views_[i]->IsVisible()) { - if (current == index) { - const int kLeftMouseButton = 1; - page_action_views_[i]->image_view()->ExecuteAction(kLeftMouseButton); - return; - } - ++current; + size_t current = 0; + for (size_t i = 0; i < page_action_views_.size(); ++i) { + if (page_action_views_[i]->IsVisible()) { + if (current == index) { + const int kLeftMouseButton = 1; + page_action_views_[i]->image_view()->ExecuteAction(kLeftMouseButton); + return; } + ++current; } } |