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

Unified Diff: chrome/browser/ui/webui/theme_source.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/ui/prefs/prefs_tab_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/theme_source.cc
diff --git a/chrome/browser/ui/webui/theme_source.cc b/chrome/browser/ui/webui/theme_source.cc
index 0c60f021c019e68575eb4adc4dc20c97d8b79356..591a11e39798590dece09b2a2cc072fa8b89a7bb 100644
--- a/chrome/browser/ui/webui/theme_source.cc
+++ b/chrome/browser/ui/webui/theme_source.cc
@@ -9,7 +9,8 @@
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/resources_util.h"
-#include "chrome/browser/search/instant_io_context.h"
+#include "chrome/browser/search/instant_io_context.h"
+#include "chrome/browser/themes/browser_theme_pack.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
@@ -113,7 +114,7 @@ base::MessageLoop* ThemeSource::MessageLoopForRequestPath(
// If it's not a themeable image, we don't need to go to the UI thread.
int resource_id = ResourcesUtil::GetThemeResourceId(uncached_path);
- if (!ThemeProperties::IsThemeableImage(resource_id))
+ if (!BrowserThemePack::IsPersistentImageID(resource_id))
return NULL;
return content::URLDataSource::MessageLoopForRequestPath(path);
@@ -140,7 +141,7 @@ void ThemeSource::SendThemeBitmap(
float scale_factor) {
ui::ScaleFactor resource_scale_factor =
ui::GetSupportedScaleFactor(scale_factor);
- if (ThemeProperties::IsThemeableImage(resource_id)) {
+ if (BrowserThemePack::IsPersistentImageID(resource_id)) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
ui::ThemeProvider* tp = ThemeServiceFactory::GetForProfile(profile_);
DCHECK(tp);
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698