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

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: Add comment about ownership and "would be nice to check FLAG_OVERLAPPED". 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
« no previous file with comments | « base/files/file.h ('k') | chrome/browser/chromeos/drive/local_file_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file.cc
diff --git a/base/files/file.cc b/base/files/file.cc
index 58f80c52322ec38125e1acbe3fda1120f64aa912..cad62ac60c2623d60d682da5921a83697e3c5540 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -63,6 +63,15 @@ File::~File() {
Close();
}
+// static
+File File::CreateForAsyncHandle(PlatformFile platform_file) {
+ File file(platform_file);
+ // It would be nice if we could validate that |platform_file| was opened
+ // with FLAG_OVERLAPPED on Windows but this doesn't appear to be possible.
scottmg 2015/06/15 21:42:45 nit; FILE_FLAG_OVERLAPPED (I don't know of a direc
Reilly Grant (use Gerrit) 2015/06/15 22:01:12 Done.
+ file.async_ = true;
+ return file;
+}
+
File& File::operator=(RValue other) {
if (this != other.object) {
Close();
« no previous file with comments | « base/files/file.h ('k') | chrome/browser/chromeos/drive/local_file_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698