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

Issue 272033: Misc. cleanup for theme provider code, including:... (Closed)

Created:
11 years, 2 months ago by Peter Kasting
Modified:
9 years, 7 months ago
Reviewers:
Miranda Callahan
CC:
chromium-reviews_googlegroups.com, John Grabowski, Paweł Hajdan Jr., pam+watch_chromium.org, tim (not reviewing), ben+cc_chromium.org
Visibility:
Public.

Description

Misc. cleanup for theme provider code, including: * Use correct indentation/alignment in a number of places * Use early-return to avoid long code block indenting * Use for() instead of while() in cases where that's what the code is actually doing * Consistent naming for iterators ("foo_iter", "bar_iter" instead of sometimes that way and sometimes "found") * Use {} when needed, don't use when not * Do not use "else" after "return" * Shorten overly-verbose code * Pull some trivial functions into the header * Eliminate unused function * Use STLDeleteValues() helper where appropriate Some of this was originally in my patch that modified constness, but I've split it out to make that more sane. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=28771

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 3

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -291 lines) Patch
M chrome/browser/browser_theme_provider.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/browser_theme_provider.cc View 1 2 34 chunks +211 lines, -243 lines 0 comments Download
M chrome/browser/browser_theme_provider_gtk.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/browser_theme_provider_mac.mm View 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/gtk/gtk_theme_provider.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/gtk/gtk_theme_provider.cc View 2 chunks +6 lines, -9 lines 0 comments Download
M chrome/browser/gtk/gtk_theme_provider_unittest.cc View 1 1 chunk +3 lines, -5 lines 0 comments Download
M views/widget/default_theme_provider.h View 2 chunks +9 lines, -4 lines 0 comments Download
M views/widget/default_theme_provider.cc View 1 2 chunks +0 lines, -14 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Peter Kasting
11 years, 2 months ago (2009-10-12 20:49:15 UTC) #1
Peter Kasting
Miranda, you want to look at this since Glen is out?
11 years, 2 months ago (2009-10-12 23:39:51 UTC) #2
Miranda Callahan
Gladly, I'll look at it right now... On 2009/10/12 23:39:51, Peter Kasting wrote: > Miranda, ...
11 years, 2 months ago (2009-10-12 23:41:34 UTC) #3
Miranda Callahan
LGTM with a nit, and noticing an earlier mistake I had made in the code. ...
11 years, 2 months ago (2009-10-12 23:57:13 UTC) #4
Peter Kasting
11 years, 2 months ago (2009-10-13 00:17:19 UTC) #5
http://codereview.chromium.org/272033/diff/1007/2009
File chrome/browser/browser_theme_provider.cc (right):

http://codereview.chromium.org/272033/diff/1007/2009#newcode201
Line 201: typedef std::map<const int, int> FrameTintMap;
On 2009/10/12 23:57:13, Miranda Callahan wrote:
> should this typedef go in browser_theme_provider.h with the other typedefs?

No, because this object isn't a class member, it's file-static.  I changed
"frame_tints_" to "frame_tints" (and similarly with "themeable_images_") to make
it clear that they're not members of anything.

There are some problems with these types; I filed crbug.com/24677 about those.

Powered by Google App Engine
This is Rietveld 408576698