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

Unified Diff: chrome/browser/themes/browser_theme_pack.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: Created 6 years, 1 month 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/browser_theme_pack.cc
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index fe2f645cb496e972096827d983f38a0818de9092..4aceb069dab59875ca1be6c6e1e39c1a06aafe96 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -793,6 +793,21 @@ void BrowserThemePack::GetThemeableImageIDRs(std::set<int>* result) {
#endif
}
+// static
+bool BrowserThemePack::FindThemeableImageIDRs(int id) {
+ for (size_t i = 0; i < kPersistingImagesLength; ++i)
+ if (kPersistingImages[i].idr_id == id)
+ return true;
+
+#if defined(USE_ASH) && !defined(OS_CHROMEOS)
+ for (size_t i = 0; i < kPersistingImagesDesktopAuraLength; ++i)
+ if (kPersistingImagesDesktopAura[i].idr_id == id)
+ return true;
+#endif
+
+ return false;
+}
+
bool BrowserThemePack::WriteToDisk(const base::FilePath& path) const {
// Add resources for each of the property arrays.
RawDataForWriting resources;

Powered by Google App Engine
This is Rietveld 408576698