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

Unified Diff: tools/grit/grit/node/include.py

Issue 2149323003: Change the way that gzipped resources are loaded from resources.pak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 4 years, 4 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 | « tools/grit/grit/format/data_pack_unittest.py ('k') | tools/grit/grit/node/include_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/node/include.py
diff --git a/tools/grit/grit/node/include.py b/tools/grit/grit/node/include.py
index c84fd54ccef2f2c129c7d5a162e3723cfb872093..74a9a41f273b1eff55ea72f01b92bdafcc689b31 100755
--- a/tools/grit/grit/node/include.py
+++ b/tools/grit/grit/node/include.py
@@ -21,8 +21,6 @@ from grit.node import base
class IncludeNode(base.Node):
"""An <include> element."""
- RESERVED_HEADER = '\xff\x1f\x8b'
-
def __init__(self):
super(IncludeNode, self).__init__()
@@ -107,16 +105,6 @@ class IncludeNode(base.Node):
data = grit.format.gzip_string.GzipStringRsyncable(data)
else:
data = grit.format.gzip_string.GzipString(data)
- data = self.RESERVED_HEADER[0] + data
- elif data[:3] == self.RESERVED_HEADER:
- # We are reserving these 3 bytes as the header for gzipped files in the
- # data pack. 1f:8b is the first two bytes of a gzipped header, and ff is
- # a custom byte we throw in front of the gzip header so that we prevent
- # accidentally throwing this error on a resource we gzipped beforehand and
- # don't wish to compress again. If this exception is hit, change the first
- # byte of RESERVED_HEADER, and then mirror that update in
- # ui/base/resource/resource_bundle.h
- raise exception.ReservedHeaderCollision()
# Include does not care about the encoding, because it only returns binary
# data.
« no previous file with comments | « tools/grit/grit/format/data_pack_unittest.py ('k') | tools/grit/grit/node/include_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698