| OLD | NEW |
| 1 // Copyright (c) 2011 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 |
| 11 int MockFileStream::Open(const FilePath& path, int open_flags) { | 11 int MockFileStream::OpenSync(const FilePath& path, int open_flags) { |
| 12 path_ = path; | 12 path_ = path; |
| 13 return ReturnError(FileStream::Open(path, open_flags)); | 13 return ReturnError(FileStream::OpenSync(path, open_flags)); |
| 14 } | 14 } |
| 15 | 15 |
| 16 int64 MockFileStream::Seek(Whence whence, int64 offset) { | 16 int64 MockFileStream::Seek(Whence whence, int64 offset) { |
| 17 return ReturnError64(FileStream::Seek(whence, offset)); | 17 return ReturnError64(FileStream::Seek(whence, offset)); |
| 18 } | 18 } |
| 19 | 19 |
| 20 int64 MockFileStream::Available() { | 20 int64 MockFileStream::Available() { |
| 21 return ReturnError64(FileStream::Available()); | 21 return ReturnError64(FileStream::Available()); |
| 22 } | 22 } |
| 23 | 23 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 41 return ReturnError64(FileStream::Truncate(bytes)); | 41 return ReturnError64(FileStream::Truncate(bytes)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 int MockFileStream::Flush() { | 44 int MockFileStream::Flush() { |
| 45 return ReturnError(FileStream::Flush()); | 45 return ReturnError(FileStream::Flush()); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace testing | 48 } // namespace testing |
| 49 | 49 |
| 50 } // namespace net | 50 } // namespace net |
| OLD | NEW |