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

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, 2 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
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | webkit/fileapi/file_writer_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 void TestDelegate::OnAuthRequired(net::URLRequest* request, 186 void TestDelegate::OnAuthRequired(net::URLRequest* request,
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 const net::SSLInfo& ssl_info,
197 net::X509Certificate* cert) { 197 bool is_hsts_host) {
198 // The caller can control whether it needs all SSL requests to go through, 198 // 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 199 // independent of any possible errors, or whether it wants SSL errors to
200 // cancel the request. 200 // cancel the request.
201 have_certificate_errors_ = true; 201 have_certificate_errors_ = true;
202 if (allow_certificate_errors_) 202 if (allow_certificate_errors_)
203 request->ContinueDespiteLastError(); 203 request->ContinueDespiteLastError();
204 else 204 else
205 request->Cancel(); 205 request->Cancel();
206 } 206 }
207 207
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 454 }
455 455
456 void TestNetworkDelegate::OnPACScriptError(int line_number, 456 void TestNetworkDelegate::OnPACScriptError(int line_number,
457 const string16& error) { 457 const string16& error) {
458 } 458 }
459 459
460 void TestNetworkDelegate::OnAuthRequired( 460 void TestNetworkDelegate::OnAuthRequired(
461 net::URLRequest* reqest, 461 net::URLRequest* reqest,
462 const net::AuthChallengeInfo& auth_info) { 462 const net::AuthChallengeInfo& auth_info) {
463 } 463 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | webkit/fileapi/file_writer_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698