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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 23704009: Adding decorations(icons) in right order to omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Using reverse iterator Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 441e8f02277ddfd74a9c3a88417bc646ecf3d262..75773c014097d73efea2567186a9335d151032a1 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -660,8 +660,13 @@ void LocationBarViewMac::Layout() {
for (size_t i = 0; i < page_action_decorations_.size(); ++i) {
[cell addRightDecoration:page_action_decorations_[i]];
}
- for (size_t i = 0; i < content_setting_decorations_.size(); ++i) {
- [cell addRightDecoration:content_setting_decorations_[i]];
+
+ // Iterate through |content_setting_decorations_| in reverse order so that
+ // the order in which the decorations are drawn matches the Views code.
+ for (ScopedVector<ContentSettingDecoration>::reverse_iterator i =
+ content_setting_decorations_.rbegin();
+ i != content_setting_decorations_.rend(); ++i) {
+ [cell addRightDecoration:*i];
}
[cell addRightDecoration:keyword_hint_decoration_.get()];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698