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

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

Issue 859213006: Cancel client auth requests when not promptable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client-auth-cancel-1
Patch Set: extension test Created 5 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 void URLRequest::Delegate::OnAuthRequired(URLRequest* request, 153 void URLRequest::Delegate::OnAuthRequired(URLRequest* request,
154 AuthChallengeInfo* auth_info) { 154 AuthChallengeInfo* auth_info) {
155 request->CancelAuth(); 155 request->CancelAuth();
156 } 156 }
157 157
158 void URLRequest::Delegate::OnCertificateRequested( 158 void URLRequest::Delegate::OnCertificateRequested(
159 URLRequest* request, 159 URLRequest* request,
160 SSLCertRequestInfo* cert_request_info) { 160 SSLCertRequestInfo* cert_request_info) {
161 request->Cancel(); 161 request->CancelWithError(ERR_SSL_CLIENT_AUTH_CERT_NEEDED);
162 } 162 }
163 163
164 void URLRequest::Delegate::OnSSLCertificateError(URLRequest* request, 164 void URLRequest::Delegate::OnSSLCertificateError(URLRequest* request,
165 const SSLInfo& ssl_info, 165 const SSLInfo& ssl_info,
166 bool is_hsts_ok) { 166 bool is_hsts_ok) {
167 request->Cancel(); 167 request->Cancel();
168 } 168 }
169 169
170 void URLRequest::Delegate::OnBeforeNetworkStart(URLRequest* request, 170 void URLRequest::Delegate::OnBeforeNetworkStart(URLRequest* request,
171 bool* defer) { 171 bool* defer) {
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 new base::debug::StackTrace(NULL, 0); 1234 new base::debug::StackTrace(NULL, 0);
1235 *stack_trace_copy = stack_trace; 1235 *stack_trace_copy = stack_trace;
1236 stack_trace_.reset(stack_trace_copy); 1236 stack_trace_.reset(stack_trace_copy);
1237 } 1237 }
1238 1238
1239 const base::debug::StackTrace* URLRequest::stack_trace() const { 1239 const base::debug::StackTrace* URLRequest::stack_trace() const {
1240 return stack_trace_.get(); 1240 return stack_trace_.get();
1241 } 1241 }
1242 1242
1243 } // namespace net 1243 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698