Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: net/url_request/url_request_test_util.cc

Issue 7976036: net: make HSTS hosts use the normal SSL interstitials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698