Chromium Code Reviews| Index: base/files/file.cc |
| diff --git a/base/files/file.cc b/base/files/file.cc |
| index 58f80c52322ec38125e1acbe3fda1120f64aa912..b8fb512dab95472af942c2f5d3a0b33695b6f565 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 |
| + // FILE_FLAG_OVERLAPPED on Windows but this doesn't appear to be possible. |
|
scottmg
2015/06/15 22:06:54
Actually, I think NtQueryObject will return the cr
Reilly Grant (use Gerrit)
2015/06/15 22:36:36
Microsoft also appears to be threatening to remove
scottmg
2015/06/15 22:42:12
Nah, it's just "internal"/"not documented", but it
|
| + file.async_ = true; |
| + return file; |
| +} |
| + |
| File& File::operator=(RValue other) { |
| if (this != other.object) { |
| Close(); |