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

Unified Diff: ui/base/resource/resource_bundle.h

Issue 394313002: Add support for loading pak files from arbitrary file regions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move Region to MemoryMappedFile Created 6 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
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 1f40728ac25f1717f748a65e4fd7625b802504c2..1e6ca16d4135df2e7074a59001284558593aa8bb 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
#include "base/files/file_path.h"
+#include "base/files/memory_mapped_file.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
@@ -166,6 +167,11 @@ class UI_BASE_EXPORT ResourceBundle {
// Same as above but using an already open file.
void AddDataPackFromFile(base::File file, ScaleFactor scale_factor);
+ // Same as above but using only a region (offset + size) of the file.
+ void AddDataPackFromFileRegion(base::File file,
+ const base::MemoryMappedFile::Region& region,
+ ScaleFactor scale_factor);
+
// Same as AddDataPackFromPath but does not log an error if the pack fails to
// load.
void AddOptionalDataPackFromPath(const base::FilePath& path,

Powered by Google App Engine
This is Rietveld 408576698