diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 20:45:13 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 20:45:13 +0000 |
commit | e6f68a67a2e15d9311b9d1e9cc81bf1b38489ad7 (patch) | |
tree | d5d466b7f318f0eaeac16cce9c49f774232811e7 /tools/data_pack | |
parent | c45f97548e30a2fb1382a3cb27759130e209ea26 (diff) | |
download | chromium_src-e6f68a67a2e15d9311b9d1e9cc81bf1b38489ad7.zip chromium_src-e6f68a67a2e15d9311b9d1e9cc81bf1b38489ad7.tar.gz chromium_src-e6f68a67a2e15d9311b9d1e9cc81bf1b38489ad7.tar.bz2 |
Revert 95480 - Abstract fullscreen exit bubble logic to bring Linux's behaviour in line with
Windows.
I committed with the wrong change description-- This has nothing to do will
fullscreen exit bubble, it has to do with data pak files).
Review URL: http://codereview.chromium.org/7549005
TBR=tony@chromium.org
Review URL: http://codereview.chromium.org/7575017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/data_pack')
-rwxr-xr-x | tools/data_pack/data_pack.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/data_pack/data_pack.py b/tools/data_pack/data_pack.py index 571842e..fde9483 100755 --- a/tools/data_pack/data_pack.py +++ b/tools/data_pack/data_pack.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2008 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -9,7 +9,7 @@ See base/pack_file* for details. import struct -FILE_FORMAT_VERSION = 2 +FILE_FORMAT_VERSION = 1 HEADER_LENGTH = 2 * 4 # Two uint32s. (file version and number of entries) class WrongFileVersion(Exception): @@ -28,9 +28,9 @@ def ReadDataPack(input_file): resources = {} # Read the index and data. data = data[HEADER_LENGTH:] - kIndexEntrySize = 2 + 2 * 4 # Each entry is 1 uint16 and 2 uint32s. + kIndexEntrySize = 3 * 4 # Each entry is 3 uint32s. for _ in range(num_entries): - id, offset, length = struct.unpack("<HII", data[:kIndexEntrySize]) + id, offset, length = struct.unpack("<III", data[:kIndexEntrySize]) data = data[kIndexEntrySize:] resources[id] = original_data[offset:offset + length] @@ -44,13 +44,12 @@ def WriteDataPack(resources, output_file): # Write file header. file.write(struct.pack("<II", FILE_FORMAT_VERSION, len(ids))) - # Each entry is 1 uint16 and 2 uint32s. - index_length = len(ids) * (2 + 2 * 4) + index_length = len(ids) * 3 * 4 # Each entry is 3 uint32s. # Write index. data_offset = HEADER_LENGTH + index_length for id in ids: - file.write(struct.pack("<HII", id, data_offset, len(resources[id]))) + file.write(struct.pack("<III", id, data_offset, len(resources[id]))) data_offset += len(resources[id]) # Write data. |