summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider_mac.mm
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 01:40:30 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 01:40:30 +0000
commitfd9c35f41bcab4966a5db8d24de812b1e9f87967 (patch)
treee896d02bd840995415ce362ff498c460f14e6601 /chrome/browser/browser_theme_provider_mac.mm
parent28fe69ab1bb9362a1ee105821ec4631b574417d3 (diff)
downloadchromium_src-fd9c35f41bcab4966a5db8d24de812b1e9f87967.zip
chromium_src-fd9c35f41bcab4966a5db8d24de812b1e9f87967.tar.gz
chromium_src-fd9c35f41bcab4966a5db8d24de812b1e9f87967.tar.bz2
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 Review URL: http://codereview.chromium.org/272033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider_mac.mm')
-rw-r--r--chrome/browser/browser_theme_provider_mac.mm18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/browser_theme_provider_mac.mm b/chrome/browser/browser_theme_provider_mac.mm
index e27f4ae..d47aa73 100644
--- a/chrome/browser/browser_theme_provider_mac.mm
+++ b/chrome/browser/browser_theme_provider_mac.mm
@@ -31,9 +31,9 @@ NSImage* BrowserThemeProvider::GetNSImageNamed(int id) {
return nil;
// Check to see if we already have the image in the cache.
- NSImageMap::const_iterator found = nsimage_cache_.find(id);
- if (found != nsimage_cache_.end())
- return found->second;
+ NSImageMap::const_iterator nsimage_iter = nsimage_cache_.find(id);
+ if (nsimage_iter != nsimage_cache_.end())
+ return nsimage_iter->second;
// Why don't we load the file directly into the image instead of the whole
// SkBitmap > native conversion?
@@ -71,9 +71,9 @@ NSColor* BrowserThemeProvider::GetNSColor(int id) {
DCHECK(CalledOnValidThread());
// Check to see if we already have the color in the cache.
- NSColorMap::const_iterator found = nscolor_cache_.find(id);
- if (found != nscolor_cache_.end())
- return found->second;
+ NSColorMap::const_iterator nscolor_iter = nscolor_cache_.find(id);
+ if (nscolor_iter != nscolor_cache_.end())
+ return nscolor_iter->second;
SkColor sk_color = GetColor(id);
NSColor* color = [NSColor
@@ -95,9 +95,9 @@ NSColor* BrowserThemeProvider::GetNSColorTint(int id) {
DCHECK(CalledOnValidThread());
// Check to see if we already have the color in the cache.
- NSColorMap::const_iterator found = nscolor_cache_.find(id);
- if (found != nscolor_cache_.end())
- return found->second;
+ NSColorMap::const_iterator nscolor_iter = nscolor_cache_.find(id);
+ if (nscolor_iter != nscolor_cache_.end())
+ return nscolor_iter->second;
TintMap::iterator tint_iter = tints_.find(GetTintKey(id));
if (tint_iter != tints_.end()) {