| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 bool request_failed() const { return request_failed_; } | 123 bool request_failed() const { return request_failed_; } |
| 124 bool have_certificate_errors() const { return have_certificate_errors_; } | 124 bool have_certificate_errors() const { return have_certificate_errors_; } |
| 125 | 125 |
| 126 // net::URLRequest::Delegate: | 126 // net::URLRequest::Delegate: |
| 127 virtual void OnReceivedRedirect(net::URLRequest* request, const GURL& new_url, | 127 virtual void OnReceivedRedirect(net::URLRequest* request, const GURL& new_url, |
| 128 bool* defer_redirect) OVERRIDE; | 128 bool* defer_redirect) OVERRIDE; |
| 129 virtual void OnAuthRequired(net::URLRequest* request, | 129 virtual void OnAuthRequired(net::URLRequest* request, |
| 130 net::AuthChallengeInfo* auth_info) OVERRIDE; | 130 net::AuthChallengeInfo* auth_info) OVERRIDE; |
| 131 virtual void OnSSLCertificateError(net::URLRequest* request, | 131 virtual void OnSSLCertificateError(net::URLRequest* request, |
| 132 int cert_error, | 132 int cert_error, |
| 133 net::X509Certificate* cert) OVERRIDE; | 133 const net::SSLInfo& ssl_info, |
| 134 bool must_be_fatal) OVERRIDE; |
| 134 virtual bool CanGetCookies(const net::URLRequest* request, | 135 virtual bool CanGetCookies(const net::URLRequest* request, |
| 135 const net::CookieList& cookie_list) const OVERRIDE; | 136 const net::CookieList& cookie_list) const OVERRIDE; |
| 136 virtual bool CanSetCookie(const net::URLRequest* request, | 137 virtual bool CanSetCookie(const net::URLRequest* request, |
| 137 const std::string& cookie_line, | 138 const std::string& cookie_line, |
| 138 net::CookieOptions* options) const OVERRIDE; | 139 net::CookieOptions* options) const OVERRIDE; |
| 139 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; | 140 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; |
| 140 virtual void OnReadCompleted(net::URLRequest* request, | 141 virtual void OnReadCompleted(net::URLRequest* request, |
| 141 int bytes_read) OVERRIDE; | 142 int bytes_read) OVERRIDE; |
| 142 | 143 |
| 143 private: | 144 private: |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // This bit-set indicates for each request id (key) what events may be sent | 224 // This bit-set indicates for each request id (key) what events may be sent |
| 224 // next. | 225 // next. |
| 225 std::map<int, int> next_states_; | 226 std::map<int, int> next_states_; |
| 226 | 227 |
| 227 // A log that records for each request id (key) the order in which On... | 228 // A log that records for each request id (key) the order in which On... |
| 228 // functions were called. | 229 // functions were called. |
| 229 std::map<int, std::string> event_order_; | 230 std::map<int, std::string> event_order_; |
| 230 }; | 231 }; |
| 231 | 232 |
| 232 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 233 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
| OLD | NEW |