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

Unified Diff: base/files/file.cc

Issue 1148383003: Only support seeking file streams from the beginning of the file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use static method instead of new constructor. Created 5 years, 7 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 58f80c52322ec38125e1acbe3fda1120f64aa912..beee5ef10fee7eecf823cb82a0f4b9133584b5fd 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -63,6 +63,13 @@ File::~File() {
Close();
}
+// static
+File File::CreateForAsyncHandle(PlatformFile platform_file) {
+ File file(platform_file);
+ file.async_ = true;
+ return file;
+}
+
File& File::operator=(RValue other) {
if (this != other.object) {
Close();

Powered by Google App Engine
This is Rietveld 408576698