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

Unified Diff: base/files/file.cc

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: Win implementation 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.cc
diff --git a/base/files/file.cc b/base/files/file.cc
index ea8dbf27ac1770d88fc6ce933a4bdd331820d2d9..580ed374775d58f1d0c08a8e259cd5011efcce4a 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -16,6 +16,17 @@ File::Info::Info()
File::Info::~Info() {
}
+File::Region::Region(int64 offset, int64 size) : offset(offset), size(size) {
+ DCHECK_GE(offset, 0);
+}
+
+File::Region::Region(File& file) : offset(0), size(file.GetLength()) {
+ DCHECK_GE(size, 0);
+}
+
+File::Region::~Region() {
+}
+
File::File()
: error_details_(FILE_ERROR_FAILED),
created_(false),

Powered by Google App Engine
This is Rietveld 408576698