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

Unified Diff: chrome/browser/browser_theme_pack.cc

Issue 1519013: Merge 43248 - BrowserThemePack: Adds persistant ids for the reload endcaps.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/366/src/
Patch Set: Created 10 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
« no previous file with comments | « no previous file | chrome/browser/browser_theme_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_theme_pack.cc
===================================================================
--- chrome/browser/browser_theme_pack.cc (revision 43260)
+++ chrome/browser/browser_theme_pack.cc (working copy)
@@ -34,7 +34,7 @@
// Version number of the current theme pack. We just throw out and rebuild
// theme packs that aren't int-equal to this.
-const int kThemePackVersion = 4;
+const int kThemePackVersion = 5;
// IDs that are in the DataPack won't clash with the positive integer
// int32_t. kHeaderID should always have the maximum value because we want the
@@ -166,7 +166,13 @@
{ 56, IDR_THROBBER, NULL },
{ 57, IDR_THROBBER_WAITING, NULL },
{ 58, IDR_THROBBER_LIGHT, NULL },
- { 59, IDR_LOCATIONBG, NULL }
+ { 59, IDR_LOCATIONBG, NULL },
+
+ { 60, IDR_RELOAD_NOBORDER, NULL },
+ { 61, IDR_RELOAD_NOBORDER_CENTER, NULL },
+ { 62, IDR_RELOAD_ENDCAP, NULL },
+ { 63, IDR_RELOAD_ENDCAP_H, NULL },
+ { 64, IDR_RELOAD_ENDCAP_P, NULL }
};
int GetPersistentIDByName(const std::string& key) {
@@ -515,6 +521,8 @@
SkBitmap* BrowserThemePack::GetBitmapNamed(int idr_id) const {
int prs_id = GetPersistentIDByIDR(idr_id);
+ if (prs_id == -1)
+ return NULL;
// Check our cache of prepared images, first.
ImageCache::const_iterator image_iter = prepared_images_.find(prs_id);
@@ -964,8 +972,7 @@
for (std::set<int>::const_iterator it = idr_ids.begin();
it != idr_ids.end(); ++it) {
int prs_id = GetPersistentIDByIDR(*it);
- if (prs_id < 0)
- continue;
+ DCHECK(prs_id > 0);
// Fetch the image by IDR...
scoped_ptr<SkBitmap> button(new SkBitmap(*rb.GetBitmapNamed(*it)));
« no previous file with comments | « no previous file | chrome/browser/browser_theme_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698