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) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 int FileStream::WriteSync(const char* buf, int buf_len) { | 73 int FileStream::WriteSync(const char* buf, int buf_len) { |
74 return impl_.WriteSync(buf, buf_len); | 74 return impl_.WriteSync(buf, buf_len); |
75 } | 75 } |
76 | 76 |
77 int64 FileStream::Truncate(int64 bytes) { | 77 int64 FileStream::Truncate(int64 bytes) { |
78 return impl_.Truncate(bytes); | 78 return impl_.Truncate(bytes); |
79 } | 79 } |
80 | 80 |
81 int FileStream::Flush() { | 81 int FileStream::Flush(const CompletionCallback& callback) { |
82 return impl_.Flush(); | 82 return impl_.Flush(callback); |
| 83 } |
| 84 |
| 85 int FileStream::FlushSync() { |
| 86 return impl_.FlushSync(); |
83 } | 87 } |
84 | 88 |
85 void FileStream::EnableErrorStatistics() { | 89 void FileStream::EnableErrorStatistics() { |
86 impl_.EnableErrorStatistics(); | 90 impl_.EnableErrorStatistics(); |
87 } | 91 } |
88 | 92 |
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 |