OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/base/file_stream.h" | 5 #include "net/base/file_stream.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 FileStream::FileStream(net::NetLog* net_log) | 9 FileStream::FileStream(net::NetLog* net_log) |
10 : impl_(net_log) { | 10 : impl_(net_log) { |
11 } | 11 } |
12 | 12 |
13 FileStream::FileStream( | 13 FileStream::FileStream( |
14 base::PlatformFile file, int flags, net::NetLog* net_log) | 14 base::PlatformFile file, int flags, net::NetLog* net_log) |
15 : impl_(file, flags, net_log) { | 15 : impl_(file, flags, net_log) { |
16 } | 16 } |
17 | 17 |
18 FileStream::~FileStream() { | 18 FileStream::~FileStream() { |
19 } | 19 } |
20 | 20 |
21 void FileStream::Close(const CompletionCallback& callback) { | 21 void FileStream::Close(const CompletionCallback& callback) { |
22 impl_.Close(callback); | 22 impl_.Close(callback); |
23 } | 23 } |
24 | 24 |
25 void FileStream::CloseSync() { | 25 void FileStream::CloseSync() { |
26 impl_.CloseSync(); | 26 impl_.CloseSync(); |
27 } | 27 } |
28 | 28 |
| 29 void FileStream::CloseAndCancelAsync() { |
| 30 impl_.CloseAndCancelAsync(); |
| 31 } |
| 32 |
29 int FileStream::Open(const FilePath& path, int open_flags, | 33 int FileStream::Open(const FilePath& path, int open_flags, |
30 const CompletionCallback& callback) { | 34 const CompletionCallback& callback) { |
31 return impl_.Open(path, open_flags, callback); | 35 return impl_.Open(path, open_flags, callback); |
32 } | 36 } |
33 | 37 |
34 int FileStream::OpenSync(const FilePath& path, int open_flags) { | 38 int FileStream::OpenSync(const FilePath& path, int open_flags) { |
35 return impl_.OpenSync(path, open_flags); | 39 return impl_.OpenSync(path, open_flags); |
36 } | 40 } |
37 | 41 |
38 bool FileStream::IsOpen() const { | 42 bool FileStream::IsOpen() const { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 void FileStream::SetBoundNetLogSource( | 93 void FileStream::SetBoundNetLogSource( |
90 const net::BoundNetLog& owner_bound_net_log) { | 94 const net::BoundNetLog& owner_bound_net_log) { |
91 impl_.SetBoundNetLogSource(owner_bound_net_log); | 95 impl_.SetBoundNetLogSource(owner_bound_net_log); |
92 } | 96 } |
93 | 97 |
94 base::PlatformFile FileStream::GetPlatformFileForTesting() { | 98 base::PlatformFile FileStream::GetPlatformFileForTesting() { |
95 return impl_.GetPlatformFileForTesting(); | 99 return impl_.GetPlatformFileForTesting(); |
96 } | 100 } |
97 | 101 |
98 } // namespace net | 102 } // namespace net |
OLD | NEW |