diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 21:17:43 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 21:17:43 +0000 |
commit | c8559b7daaa7d9877fca1cf355baf62eb4c54668 (patch) | |
tree | c8551012cfbc0800aad09af6ed7cb08b67311935 /chrome/browser/browser_theme_provider.cc | |
parent | ceae8579ac4d3329eec766525f976f6383678c76 (diff) | |
download | chromium_src-c8559b7daaa7d9877fca1cf355baf62eb4c54668.zip chromium_src-c8559b7daaa7d9877fca1cf355baf62eb4c54668.tar.gz chromium_src-c8559b7daaa7d9877fca1cf355baf62eb4c54668.tar.bz2 |
- Fix bug where white logo wasn't showing
- Add attribution support back to the NTP
BUG=20019
TEST=Install a theme with a white logo and attribution, and verify that both display correctly.
Review URL: http://codereview.chromium.org/173372
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.cc')
-rw-r--r-- | chrome/browser/browser_theme_provider.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc index 6021712..0b43fa3 100644 --- a/chrome/browser/browser_theme_provider.cc +++ b/chrome/browser/browser_theme_provider.cc @@ -265,12 +265,6 @@ void BrowserThemeProvider::Init(Profile* profile) { SkBitmap* BrowserThemeProvider::GetBitmapNamed(int id) { DCHECK(CalledOnValidThread()); - // Check to see whether we should substitute some images. - int ntp_alternate; - GetDisplayProperty(NTP_LOGO_ALTERNATE, &ntp_alternate); - if (id == IDR_PRODUCT_LOGO && ntp_alternate != 0) - id = IDR_PRODUCT_LOGO_WHITE; - // Check to see if we already have the Skia image in the cache. ImageCache::const_iterator found = image_cache_.find(id); if (found != image_cache_.end()) @@ -459,6 +453,12 @@ bool BrowserThemeProvider::HasCustomImage(int id) { bool BrowserThemeProvider::GetRawData(int id, std::vector<unsigned char>* raw_data) { + // Check to see whether we should substitute some images. + int ntp_alternate; + GetDisplayProperty(NTP_LOGO_ALTERNATE, &ntp_alternate); + if (id == IDR_PRODUCT_LOGO && ntp_alternate != 0) + id = IDR_PRODUCT_LOGO_WHITE; + if (raw_data_.find(id) != raw_data_.end()) { *raw_data = raw_data_[id]; return true; |