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

Unified Diff: chrome/browser/themes/theme_service_mac.mm

Issue 13497002: Crop images from custom themes before storing them into the theme pack (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
Index: chrome/browser/themes/theme_service_mac.mm
diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm
index abb441bbea9f68c7c281b8ad7dc370c2669fce85..146558e87214d8646ab5843a003622b96107ade4 100644
--- a/chrome/browser/themes/theme_service_mac.mm
+++ b/chrome/browser/themes/theme_service_mac.mm
@@ -52,9 +52,9 @@ NSImage* ThemeService::GetNSImageNamed(int id, bool allow_default) const {
// - To get the generated tinted images.
NSImage* nsimage = nil;
if (theme_pack_.get()) {
- const gfx::Image* image = theme_pack_->GetImageNamed(id);
- if (image)
- nsimage = image->ToNSImage();
+ gfx::Image image = theme_pack_->GetImageNamed(id);
+ if (!image.IsEmpty())
+ nsimage = image.ToNSImage();
}
// If the theme didn't override this image then load it from the resource

Powered by Google App Engine
This is Rietveld 408576698