Index: ui/base/resource/resource_bundle.cc |
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc |
index b2be5e460c2a7eff2d0acf2f90bb3e6cef5d4555..a9786aac2d2676f998781206dc4ac6cf041b6c71 100644 |
--- a/ui/base/resource/resource_bundle.cc |
+++ b/ui/base/resource/resource_bundle.cc |
@@ -234,9 +234,17 @@ void ResourceBundle::AddOptionalDataPackFromPath(const base::FilePath& path, |
void ResourceBundle::AddDataPackFromFile(base::File file, |
ScaleFactor scale_factor) { |
+ AddDataPackFromFileRegion( |
+ file.Pass(), base::MemoryMappedFile::Region::kWholeFile, scale_factor); |
+} |
+ |
+void ResourceBundle::AddDataPackFromFileRegion( |
+ base::File file, |
+ const base::MemoryMappedFile::Region& region, |
+ ScaleFactor scale_factor) { |
scoped_ptr<DataPack> data_pack( |
new DataPack(scale_factor)); |
- if (data_pack->LoadFromFile(file.Pass())) { |
+ if (data_pack->LoadFromFileRegion(file.Pass(), region)) { |
AddDataPack(data_pack.release()); |
} else { |
LOG(ERROR) << "Failed to load data pack from file." |