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

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

Issue 7555003: Update the .pak file format to version 2: Make resource ids 16bit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: evan's review feedback Created 9 years, 5 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 | « chrome/browser/themes/browser_theme_pack.h ('k') | tools/data_pack/data_pack.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6b1f9401fea381483cdac70d5bb0e0f4fda12a03..ad76008615fa161ebc3672d117df3f6d2fcfd250 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/themes/browser_theme_pack.h"
+#include <limits>
+
#include "base/stl_util.h"
#include "base/string_util.h"
#include "base/threading/thread_restrictions.h"
@@ -27,18 +29,18 @@ namespace {
// 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 = 15;
+const int kThemePackVersion = 16;
// 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
+// uint16. kHeaderID should always have the maximum value because we want the
// "header" to be written last. That way we can detect whether the pack was
// successfully written and ignore and regenerate if it was only partially
// written (i.e. chrome crashed on a different thread while writing the pack).
-const int kHeaderID = UINT_MAX - 1;
-const int kTintsID = UINT_MAX - 2;
-const int kColorsID = UINT_MAX - 3;
-const int kDisplayPropertiesID = UINT_MAX - 4;
-const int kSourceImagesID = UINT_MAX - 5;
+const int kHeaderID = std::numeric_limits<uint16>::max() - 1;
+const int kTintsID = std::numeric_limits<uint16>::max() - 2;
+const int kColorsID = std::numeric_limits<uint16>::max() - 3;
+const int kDisplayPropertiesID = std::numeric_limits<uint16>::max() - 4;
+const int kSourceImagesID = std::numeric_limits<uint16>::max() - 5;
// Static size of the tint/color/display property arrays that are mmapped.
const int kTintArraySize = 6;
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.h ('k') | tools/data_pack/data_pack.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698