| 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 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 namespace testing { | 16 namespace testing { |
| 17 | 17 |
| 18 MockFileStream::MockFileStream( | 18 MockFileStream::MockFileStream( |
| 19 const scoped_refptr<base::TaskRunner>& task_runner) | 19 const scoped_refptr<base::TaskRunner>& task_runner) |
| 20 : FileStream(task_runner), | 20 : FileStream(task_runner), |
| 21 forced_error_(OK), | 21 forced_error_(OK), |
| 22 async_error_(false), | 22 async_error_(false), |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 return ERR_IO_PENDING; | 136 return ERR_IO_PENDING; |
| 137 } | 137 } |
| 138 int64_t ret = forced_error_; | 138 int64_t ret = forced_error_; |
| 139 clear_forced_error(); | 139 clear_forced_error(); |
| 140 return ret; | 140 return ret; |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace testing | 143 } // namespace testing |
| 144 | 144 |
| 145 } // namespace net | 145 } // namespace net |
| OLD | NEW |