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 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 bool received_data_before_response() const { | 169 bool received_data_before_response() const { |
170 return received_data_before_response_; | 170 return received_data_before_response_; |
171 } | 171 } |
172 bool request_failed() const { return request_failed_; } | 172 bool request_failed() const { return request_failed_; } |
173 bool have_certificate_errors() const { return have_certificate_errors_; } | 173 bool have_certificate_errors() const { return have_certificate_errors_; } |
174 bool certificate_errors_are_fatal() const { | 174 bool certificate_errors_are_fatal() const { |
175 return certificate_errors_are_fatal_; | 175 return certificate_errors_are_fatal_; |
176 } | 176 } |
177 bool auth_required_called() const { return auth_required_; } | 177 bool auth_required_called() const { return auth_required_; } |
178 bool have_full_request_headers() const { return have_full_request_headers_; } | 178 bool have_full_request_headers() const { return have_full_request_headers_; } |
| 179 bool response_completed() const { return response_completed_; } |
179 const HttpRequestHeaders& full_request_headers() const { | 180 const HttpRequestHeaders& full_request_headers() const { |
180 return full_request_headers_; | 181 return full_request_headers_; |
181 } | 182 } |
182 void ClearFullRequestHeaders(); | 183 void ClearFullRequestHeaders(); |
183 int request_status() const { return request_status_; } | 184 int request_status() const { return request_status_; } |
184 | 185 |
185 // URLRequest::Delegate: | 186 // URLRequest::Delegate: |
186 void OnReceivedRedirect(URLRequest* request, | 187 void OnReceivedRedirect(URLRequest* request, |
187 const RedirectInfo& redirect_info, | 188 const RedirectInfo& redirect_info, |
188 bool* defer_redirect) override; | 189 bool* defer_redirect) override; |
(...skipping 29 matching lines...) Expand all Loading... |
218 int received_bytes_count_; | 219 int received_bytes_count_; |
219 int received_redirect_count_; | 220 int received_redirect_count_; |
220 bool received_data_before_response_; | 221 bool received_data_before_response_; |
221 bool request_failed_; | 222 bool request_failed_; |
222 bool have_certificate_errors_; | 223 bool have_certificate_errors_; |
223 bool certificate_errors_are_fatal_; | 224 bool certificate_errors_are_fatal_; |
224 bool auth_required_; | 225 bool auth_required_; |
225 std::string data_received_; | 226 std::string data_received_; |
226 bool have_full_request_headers_; | 227 bool have_full_request_headers_; |
227 HttpRequestHeaders full_request_headers_; | 228 HttpRequestHeaders full_request_headers_; |
| 229 bool response_completed_; |
228 | 230 |
229 // tracks status of request | 231 // tracks status of request |
230 int request_status_; | 232 int request_status_; |
231 | 233 |
232 // our read buffer | 234 // our read buffer |
233 scoped_refptr<IOBuffer> buf_; | 235 scoped_refptr<IOBuffer> buf_; |
234 }; | 236 }; |
235 | 237 |
236 //----------------------------------------------------------------------------- | 238 //----------------------------------------------------------------------------- |
237 | 239 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 NetworkDelegate* network_delegate) const override; | 418 NetworkDelegate* network_delegate) const override; |
417 void set_main_intercept_job(std::unique_ptr<URLRequestJob> job); | 419 void set_main_intercept_job(std::unique_ptr<URLRequestJob> job); |
418 | 420 |
419 private: | 421 private: |
420 mutable std::unique_ptr<URLRequestJob> main_intercept_job_; | 422 mutable std::unique_ptr<URLRequestJob> main_intercept_job_; |
421 }; | 423 }; |
422 | 424 |
423 } // namespace net | 425 } // namespace net |
424 | 426 |
425 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 427 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
OLD | NEW |