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

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 1275513006: Check for empty security info when sending security info to devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/child/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 bool report_security_info) { 288 bool report_security_info) {
289 if (!report_security_info) { 289 if (!report_security_info) {
290 response->setSecurityStyle(WebURLResponse::SecurityStyleUnknown); 290 response->setSecurityStyle(WebURLResponse::SecurityStyleUnknown);
291 return; 291 return;
292 } 292 }
293 if (!url.SchemeIsCryptographic()) { 293 if (!url.SchemeIsCryptographic()) {
294 response->setSecurityStyle(WebURLResponse::SecurityStyleUnauthenticated); 294 response->setSecurityStyle(WebURLResponse::SecurityStyleUnauthenticated);
295 return; 295 return;
296 } 296 }
297 297
298 // There are cases where an HTTPS request can come in without security
299 // info attached (such as a redirect response).
davidben 2015/08/11 12:17:10 (Huh, we don't send down security info in this cas
300 if (security_info.empty()) {
301 response->setSecurityStyle(WebURLResponse::SecurityStyleUnknown);
302 return;
303 }
304
298 SSLStatus ssl_status; 305 SSLStatus ssl_status;
299 if (!DeserializeSecurityInfo(security_info, &ssl_status)) { 306 if (!DeserializeSecurityInfo(security_info, &ssl_status)) {
300 response->setSecurityStyle(WebURLResponse::SecurityStyleUnknown); 307 response->setSecurityStyle(WebURLResponse::SecurityStyleUnknown);
301 DLOG(ERROR) 308 DLOG(ERROR)
302 << "DeserializeSecurityInfo() failed for an authenticated request."; 309 << "DeserializeSecurityInfo() failed for an authenticated request.";
303 return; 310 return;
304 } 311 }
305 312
306 int ssl_version = 313 int ssl_version =
307 net::SSLConnectionStatusToVersion(ssl_status.connection_status); 314 net::SSLConnectionStatusToVersion(ssl_status.connection_status);
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 int intra_priority_value) { 1151 int intra_priority_value) {
1145 context_->DidChangePriority(new_priority, intra_priority_value); 1152 context_->DidChangePriority(new_priority, intra_priority_value);
1146 } 1153 }
1147 1154
1148 bool WebURLLoaderImpl::attachThreadedDataReceiver( 1155 bool WebURLLoaderImpl::attachThreadedDataReceiver(
1149 blink::WebThreadedDataReceiver* threaded_data_receiver) { 1156 blink::WebThreadedDataReceiver* threaded_data_receiver) {
1150 return context_->AttachThreadedDataReceiver(threaded_data_receiver); 1157 return context_->AttachThreadedDataReceiver(threaded_data_receiver);
1151 } 1158 }
1152 1159
1153 } // namespace content 1160 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698