Chromium Code Reviews| Index: net/base/file_stream.cc |
| diff --git a/net/base/file_stream.cc b/net/base/file_stream.cc |
| index 85adaece3cd404aaf703330c1be77863e503e749..06b7c8ec0c037b743403f5122a047c0630ae94c2 100644 |
| --- a/net/base/file_stream.cc |
| +++ b/net/base/file_stream.cc |
| @@ -93,6 +93,20 @@ int FileStream::OpenSync(const base::FilePath& path, int open_flags) { |
| return context_->OpenSync(path, open_flags_); |
| } |
| +int FileStream::Close(const CompletionCallback& callback) { |
| + DCHECK(is_async()); |
| + context_->CloseAsync(callback); |
| + return ERR_IO_PENDING; |
| +} |
| + |
| +int FileStream::CloseSync() { |
| + DCHECK(!is_async()); |
| + base::ThreadRestrictions::AssertIOAllowed(); |
| + context_->CloseSync(); |
| + return OK; |
| +} |
| + |
| + |
|
mmenke
2013/09/11 15:16:11
nit: Remove extra line break.
waffles
2013/09/11 19:54:48
Done.
|
| bool FileStream::IsOpen() const { |
| return context_->file() != base::kInvalidPlatformFileValue; |
| } |