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

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

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove "httpsv" scheme, minor NSS/OpenSSL changes Created 9 years, 8 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') | net/url_request/url_request_unittest.cc » ('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/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "net/http/http_network_session.h" 10 #include "net/http/http_network_session.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 void TestDelegate::OnAuthRequired(net::URLRequest* request, 174 void TestDelegate::OnAuthRequired(net::URLRequest* request,
175 net::AuthChallengeInfo* auth_info) { 175 net::AuthChallengeInfo* auth_info) {
176 if (!username_.empty() || !password_.empty()) { 176 if (!username_.empty() || !password_.empty()) {
177 request->SetAuth(username_, password_); 177 request->SetAuth(username_, password_);
178 } else { 178 } else {
179 request->CancelAuth(); 179 request->CancelAuth();
180 } 180 }
181 } 181 }
182 182
183 void TestDelegate::OnTLSLoginRequired(
184 net::URLRequest* request,
185 net::AuthChallengeInfo* login_request_info) {
186 }
187
183 void TestDelegate::OnSSLCertificateError(net::URLRequest* request, 188 void TestDelegate::OnSSLCertificateError(net::URLRequest* request,
184 int cert_error, 189 int cert_error,
185 net::X509Certificate* cert) { 190 net::X509Certificate* cert) {
186 // The caller can control whether it needs all SSL requests to go through, 191 // The caller can control whether it needs all SSL requests to go through,
187 // independent of any possible errors, or whether it wants SSL errors to 192 // independent of any possible errors, or whether it wants SSL errors to
188 // cancel the request. 193 // cancel the request.
189 have_certificate_errors_ = true; 194 have_certificate_errors_ = true;
190 if (allow_certificate_errors_) 195 if (allow_certificate_errors_)
191 request->ContinueDespiteLastError(); 196 request->ContinueDespiteLastError();
192 else 197 else
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 if (!request->status().is_io_pending()) 276 if (!request->status().is_io_pending())
272 OnResponseCompleted(request); 277 OnResponseCompleted(request);
273 else if (cancel_in_rd_pending_) 278 else if (cancel_in_rd_pending_)
274 request->Cancel(); 279 request->Cancel();
275 } 280 }
276 281
277 void TestDelegate::OnResponseCompleted(net::URLRequest* request) { 282 void TestDelegate::OnResponseCompleted(net::URLRequest* request) {
278 if (quit_on_complete_) 283 if (quit_on_complete_)
279 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 284 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
280 } 285 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698