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. |
| 107 bool waiting_on_buffer_ = false; |
| 108 |
106 std::unique_ptr<base::RunLoop> canceled_or_idle_run_loop_; | 109 std::unique_ptr<base::RunLoop> canceled_or_idle_run_loop_; |
107 | 110 |
108 base::WeakPtrFactory<MockResourceLoader> weak_factory_; | 111 base::WeakPtrFactory<MockResourceLoader> weak_factory_; |
109 | 112 |
110 DISALLOW_COPY_AND_ASSIGN(MockResourceLoader); | 113 DISALLOW_COPY_AND_ASSIGN(MockResourceLoader); |
111 }; | 114 }; |
112 | 115 |
113 } // namespace content | 116 } // namespace content |
114 | 117 |
115 #endif // CONTENT_BROWSER_LOADER_TEST_RESOURCE_HANDLER_WRAPPER_H_ | 118 #endif // CONTENT_BROWSER_LOADER_TEST_RESOURCE_HANDLER_WRAPPER_H_ |
OLD | NEW |