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

Unified Diff: base/files/file.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: Address first willchan@ comments 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: base/files/file.h
diff --git a/base/files/file.h b/base/files/file.h
index 1913bc7f6c408c8e1e3840da712895ff2fd88259..c20df5c3edcde03d8c1e09a0074101721f278e3b 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -155,6 +155,23 @@ class BASE_EXPORT File {
base::Time creation_time;
};
+ // Used to hold information about a region [offset + size] of a file.
+ struct BASE_EXPORT Region {
+ static Region WholeFile();
Jeffrey Yasskin 2014/07/22 21:22:29 Maybe-dumb drive-by suggestion: Maybe make this Re
Primiano Tucci (use gerrit) 2014/07/23 23:17:38 If you take a look to patchsets 3-4 I used that ap
+
+ Region(int64 offset, int64 size);
+ ~Region();
+
+ // Whether the region intends to cover the entire file.
+ bool IsWholeFile() const;
+
+ // Start of the region (measured in bytes from the beginning of the file).
+ int64 offset;
+
+ // Length of the region.
+ int64 size;
+ };
+
File();
// Creates or opens the given file. This will fail with 'access denied' if the
« no previous file with comments | « base/base.gyp ('k') | base/files/file.cc » ('j') | base/files/memory_mapped_file.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698