Add support for loading pak files from arbitrary file regions.
commit3fa9ff85fe4aadddf02d5fec816d5844ddc97885
authorprimiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 28 Jul 2014 17:57:40 +0000 (28 17:57 +0000)
committerprimiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 28 Jul 2014 17:57:40 +0000 (28 17:57 +0000)
tree2873667d5367167edb5de69e5890f43a64d4ceb8
parentf36a443d83bc3f77a9be80f71c13835270ebbbf4
Add support for loading pak files from arbitrary file regions.

This is to support a new use case for Android: mmap a pak file
directly from the APK (where it will be stored uncompressed)
without extracting it first. This would save both precious space
on the flash and startup time on the first run.
This CL introduces:
 - the necessary changes to base::File to memory map arbitrary
  regions of a file.
 - The corresponding changes (plus unittests)  in DataPack and
  ResourceBundle to take advantage of the new support.
At present state, this CL is not intended to introduce any
behavioral change.

BUG=394502

Review URL: https://codereview.chromium.org/394313002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285945 0039d316-1c4b-4281-b951-d872f2087c98
base/base.gyp
base/files/memory_mapped_file.cc
base/files/memory_mapped_file.h
base/files/memory_mapped_file_posix.cc
base/files/memory_mapped_file_unittest.cc [new file with mode: 0644]
base/files/memory_mapped_file_win.cc
ui/base/resource/data_pack.cc
ui/base/resource/data_pack.h
ui/base/resource/data_pack_unittest.cc
ui/base/resource/resource_bundle.cc
ui/base/resource/resource_bundle.h