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

Unified Diff: chrome/browser/ui/views/toolbar/browser_actions_container.cc

Issue 1675483002: Allow use of container cbegin() and cend() methods, plus sample uses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add note about non-member cbegin() and cend(). Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model_stats_recorder.cc ('k') | styleguide/c++/c++11.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/browser_actions_container.cc
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.cc b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
index 71e57f5b4b9b83fc9149a3bcc048381659d0028b..dfdbdece2325033a5f44b881ab789a937c49153a 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.cc
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
@@ -598,11 +598,10 @@ void BrowserActionsContainer::WriteDragDataForView(View* sender,
toolbar_actions_bar_->OnDragStarted();
DCHECK(data);
- ToolbarActionViews::iterator iter = std::find(toolbar_action_views_.begin(),
- toolbar_action_views_.end(),
- sender);
- DCHECK(iter != toolbar_action_views_.end());
- ToolbarActionViewController* view_controller = (*iter)->view_controller();
+ auto it = std::find(toolbar_action_views_.cbegin(),
+ toolbar_action_views_.cend(), sender);
+ DCHECK(it != toolbar_action_views_.cend());
+ ToolbarActionViewController* view_controller = (*it)->view_controller();
gfx::Size size(ToolbarActionsBar::IconWidth(false),
ToolbarActionsBar::IconHeight());
drag_utils::SetDragImageOnDataObject(
@@ -611,7 +610,7 @@ void BrowserActionsContainer::WriteDragDataForView(View* sender,
data);
// Fill in the remaining info.
BrowserActionDragData drag_data(view_controller->GetId(),
- iter - toolbar_action_views_.begin());
+ it - toolbar_action_views_.cbegin());
drag_data.Write(browser_->profile(), data);
}
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model_stats_recorder.cc ('k') | styleguide/c++/c++11.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698