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 <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 return certificate_errors_are_fatal_; | 168 return certificate_errors_are_fatal_; |
169 } | 169 } |
170 bool auth_required_called() const { return auth_required_; } | 170 bool auth_required_called() const { return auth_required_; } |
171 bool have_full_request_headers() const { return have_full_request_headers_; } | 171 bool have_full_request_headers() const { return have_full_request_headers_; } |
172 const HttpRequestHeaders& full_request_headers() const { | 172 const HttpRequestHeaders& full_request_headers() const { |
173 return full_request_headers_; | 173 return full_request_headers_; |
174 } | 174 } |
175 void ClearFullRequestHeaders(); | 175 void ClearFullRequestHeaders(); |
176 | 176 |
177 // URLRequest::Delegate: | 177 // URLRequest::Delegate: |
178 virtual void OnReceivedRedirect(URLRequest* request, const GURL& new_url, | 178 virtual void OnReceivedRedirect(URLRequest* request, |
| 179 const RedirectInfo& redirect_info, |
179 bool* defer_redirect) OVERRIDE; | 180 bool* defer_redirect) OVERRIDE; |
180 virtual void OnBeforeNetworkStart(URLRequest* request, bool* defer) OVERRIDE; | 181 virtual void OnBeforeNetworkStart(URLRequest* request, bool* defer) OVERRIDE; |
181 virtual void OnAuthRequired(URLRequest* request, | 182 virtual void OnAuthRequired(URLRequest* request, |
182 AuthChallengeInfo* auth_info) OVERRIDE; | 183 AuthChallengeInfo* auth_info) OVERRIDE; |
183 // NOTE: |fatal| causes |certificate_errors_are_fatal_| to be set to true. | 184 // NOTE: |fatal| causes |certificate_errors_are_fatal_| to be set to true. |
184 // (Unit tests use this as a post-condition.) But for policy, this method | 185 // (Unit tests use this as a post-condition.) But for policy, this method |
185 // consults |allow_certificate_errors_|. | 186 // consults |allow_certificate_errors_|. |
186 virtual void OnSSLCertificateError(URLRequest* request, | 187 virtual void OnSSLCertificateError(URLRequest* request, |
187 const SSLInfo& ssl_info, | 188 const SSLInfo& ssl_info, |
188 bool fatal) OVERRIDE; | 189 bool fatal) OVERRIDE; |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 NetworkDelegate* network_delegate) const OVERRIDE; | 408 NetworkDelegate* network_delegate) const OVERRIDE; |
408 void set_main_intercept_job(URLRequestJob* job); | 409 void set_main_intercept_job(URLRequestJob* job); |
409 | 410 |
410 private: | 411 private: |
411 mutable URLRequestJob* main_intercept_job_; | 412 mutable URLRequestJob* main_intercept_job_; |
412 }; | 413 }; |
413 | 414 |
414 } // namespace net | 415 } // namespace net |
415 | 416 |
416 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 417 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
OLD | NEW |