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

Unified Diff: chrome/browser/themes/theme_service.cc

Issue 747013003: Various optimizations to reduce the number of temporary allocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added back calls to c_str that were removed by mistake. Created 6 years 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 | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 053cfb89c26a91125ec60624a12776b5f9e38d57..8c5c9b698c5d11f92929e14b6a117370274ee102 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -236,13 +236,8 @@ bool ThemeService::ShouldUseNativeFrame() const {
}
bool ThemeService::HasCustomImage(int id) const {
- if (!Properties::IsThemeableImage(id))
- return false;
-
- if (theme_supplier_.get())
- return theme_supplier_->HasCustomImage(id);
-
- return false;
+ return BrowserThemePack::IsPersistentImageID(id) &&
+ theme_supplier_ && theme_supplier_->HasCustomImage(id);
}
base::RefCountedMemory* ThemeService::GetRawData(
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698