| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CONTENT_BROWSER_LOADER_MOCK_RESOURCE_LOADER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_MOCK_RESOURCE_LOADER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_MOCK_RESOURCE_LOADER_H_ | 6 #define CONTENT_BROWSER_LOADER_MOCK_RESOURCE_LOADER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 ResourceHandler* const resource_handler_; | 97 ResourceHandler* const resource_handler_; |
| 98 | 98 |
| 99 Status status_ = Status::IDLE; | 99 Status status_ = Status::IDLE; |
| 100 int error_code_ = net::OK; | 100 int error_code_ = net::OK; |
| 101 bool canceled_out_of_band_ = false; | 101 bool canceled_out_of_band_ = false; |
| 102 | 102 |
| 103 scoped_refptr<net::IOBuffer> io_buffer_; | 103 scoped_refptr<net::IOBuffer> io_buffer_; |
| 104 int io_buffer_size_ = 0; | 104 int io_buffer_size_ = 0; |
| 105 | 105 |
| 106 // True if waiting to receive a buffer due to an OnWillRead call. This does |
| 107 // not affect behavior; it's only used for DCHECKing. |
| 108 bool waiting_on_buffer_ = false; |
| 109 |
| 106 std::unique_ptr<base::RunLoop> canceled_or_idle_run_loop_; | 110 std::unique_ptr<base::RunLoop> canceled_or_idle_run_loop_; |
| 107 | 111 |
| 108 base::WeakPtrFactory<MockResourceLoader> weak_factory_; | 112 base::WeakPtrFactory<MockResourceLoader> weak_factory_; |
| 109 | 113 |
| 110 DISALLOW_COPY_AND_ASSIGN(MockResourceLoader); | 114 DISALLOW_COPY_AND_ASSIGN(MockResourceLoader); |
| 111 }; | 115 }; |
| 112 | 116 |
| 113 } // namespace content | 117 } // namespace content |
| 114 | 118 |
| 115 #endif // CONTENT_BROWSER_LOADER_TEST_RESOURCE_HANDLER_WRAPPER_H_ | 119 #endif // CONTENT_BROWSER_LOADER_TEST_RESOURCE_HANDLER_WRAPPER_H_ |
| OLD | NEW |