| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_UNITTEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 // The caller can control whether it needs all SSL requests to go through, | 302 // The caller can control whether it needs all SSL requests to go through, |
| 303 // independent of any possible errors, or whether it wants SSL errors to | 303 // independent of any possible errors, or whether it wants SSL errors to |
| 304 // cancel the request. | 304 // cancel the request. |
| 305 have_certificate_errors_ = true; | 305 have_certificate_errors_ = true; |
| 306 if (allow_certificate_errors_) | 306 if (allow_certificate_errors_) |
| 307 request->ContinueDespiteLastError(); | 307 request->ContinueDespiteLastError(); |
| 308 else | 308 else |
| 309 request->Cancel(); | 309 request->Cancel(); |
| 310 } | 310 } |
| 311 | 311 |
| 312 virtual void OnGetCookies(URLRequest* request, bool blocked_by_policy) { | 312 virtual void OnGetCookies(URLRequest* request, |
| 313 const net::CookieMonster::CookieList& cookie_list, |
| 314 bool blocked_by_policy) { |
| 313 if (blocked_by_policy) { | 315 if (blocked_by_policy) { |
| 314 blocked_get_cookies_count_++; | 316 blocked_get_cookies_count_++; |
| 315 if (cancel_in_getcookiesblocked_) | 317 if (cancel_in_getcookiesblocked_) |
| 316 request->Cancel(); | 318 request->Cancel(); |
| 317 } | 319 } |
| 318 } | 320 } |
| 319 | 321 |
| 320 virtual void OnSetCookie(URLRequest* request, | 322 virtual void OnSetCookie(URLRequest* request, |
| 321 const std::string& cookie_line, | 323 const std::string& cookie_line, |
| 322 bool blocked_by_policy) { | 324 bool blocked_by_policy) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 bool received_data_before_response_; | 391 bool received_data_before_response_; |
| 390 bool request_failed_; | 392 bool request_failed_; |
| 391 bool have_certificate_errors_; | 393 bool have_certificate_errors_; |
| 392 std::string data_received_; | 394 std::string data_received_; |
| 393 | 395 |
| 394 // our read buffer | 396 // our read buffer |
| 395 scoped_refptr<net::IOBuffer> buf_; | 397 scoped_refptr<net::IOBuffer> buf_; |
| 396 }; | 398 }; |
| 397 | 399 |
| 398 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 400 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| OLD | NEW |