| 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 #include "net/url_request/url_request_test_util.h" | 5 #include "net/url_request/url_request_test_util.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 net::AuthChallengeInfo* auth_info) { | 187 net::AuthChallengeInfo* auth_info) { |
| 188 if (!username_.empty() || !password_.empty()) { | 188 if (!username_.empty() || !password_.empty()) { |
| 189 request->SetAuth(username_, password_); | 189 request->SetAuth(username_, password_); |
| 190 } else { | 190 } else { |
| 191 request->CancelAuth(); | 191 request->CancelAuth(); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 | 194 |
| 195 void TestDelegate::OnSSLCertificateError(net::URLRequest* request, | 195 void TestDelegate::OnSSLCertificateError(net::URLRequest* request, |
| 196 int cert_error, | 196 int cert_error, |
| 197 net::X509Certificate* cert) { | 197 const net::SSLInfo& ssl_info, |
| 198 bool must_be_fatal) { |
| 198 // The caller can control whether it needs all SSL requests to go through, | 199 // The caller can control whether it needs all SSL requests to go through, |
| 199 // independent of any possible errors, or whether it wants SSL errors to | 200 // independent of any possible errors, or whether it wants SSL errors to |
| 200 // cancel the request. | 201 // cancel the request. |
| 201 have_certificate_errors_ = true; | 202 have_certificate_errors_ = true; |
| 202 if (allow_certificate_errors_) | 203 if (allow_certificate_errors_) |
| 203 request->ContinueDespiteLastError(); | 204 request->ContinueDespiteLastError(); |
| 204 else | 205 else |
| 205 request->Cancel(); | 206 request->Cancel(); |
| 206 } | 207 } |
| 207 | 208 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 } | 455 } |
| 455 | 456 |
| 456 void TestNetworkDelegate::OnPACScriptError(int line_number, | 457 void TestNetworkDelegate::OnPACScriptError(int line_number, |
| 457 const string16& error) { | 458 const string16& error) { |
| 458 } | 459 } |
| 459 | 460 |
| 460 void TestNetworkDelegate::OnAuthRequired( | 461 void TestNetworkDelegate::OnAuthRequired( |
| 461 net::URLRequest* reqest, | 462 net::URLRequest* reqest, |
| 462 const net::AuthChallengeInfo& auth_info) { | 463 const net::AuthChallengeInfo& auth_info) { |
| 463 } | 464 } |
| OLD | NEW |