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/mock_file_stream.h" | 5 #include "net/base/mock_file_stream.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 namespace testing { | 9 namespace testing { |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 int MockFileStream::WriteSync(const char* buf, int buf_len) { | 49 int MockFileStream::WriteSync(const char* buf, int buf_len) { |
50 return ReturnError(FileStream::WriteSync(buf, buf_len)); | 50 return ReturnError(FileStream::WriteSync(buf, buf_len)); |
51 } | 51 } |
52 | 52 |
53 int64 MockFileStream::Truncate(int64 bytes) { | 53 int64 MockFileStream::Truncate(int64 bytes) { |
54 return ReturnError64(FileStream::Truncate(bytes)); | 54 return ReturnError64(FileStream::Truncate(bytes)); |
55 } | 55 } |
56 | 56 |
57 int MockFileStream::Flush() { | 57 int MockFileStream::Flush(const CompletionCallback& callback) { |
58 return ReturnError(FileStream::Flush()); | 58 return ReturnError(FileStream::Flush(callback)); |
| 59 } |
| 60 |
| 61 int MockFileStream::FlushSync() { |
| 62 return ReturnError(FileStream::FlushSync()); |
59 } | 63 } |
60 | 64 |
61 } // namespace testing | 65 } // namespace testing |
62 | 66 |
63 } // namespace net | 67 } // namespace net |
OLD | NEW |