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

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

Issue 2208803002: Remove SCT counters from DevTools security panel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | third_party/WebKit/LayoutTests/http/tests/inspector/security/sct-summary.html » ('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 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 case SECURITY_STYLE_WARNING: 271 case SECURITY_STYLE_WARNING:
272 securityStyle = WebURLResponse::SecurityStyleWarning; 272 securityStyle = WebURLResponse::SecurityStyleWarning;
273 break; 273 break;
274 case SECURITY_STYLE_AUTHENTICATED: 274 case SECURITY_STYLE_AUTHENTICATED:
275 securityStyle = WebURLResponse::SecurityStyleAuthenticated; 275 securityStyle = WebURLResponse::SecurityStyleAuthenticated;
276 break; 276 break;
277 } 277 }
278 278
279 response->setSecurityStyle(securityStyle); 279 response->setSecurityStyle(securityStyle);
280 280
281 size_t num_unknown_scts = ssl_status.num_unknown_scts;
282 size_t num_invalid_scts = ssl_status.num_invalid_scts;
283 size_t num_valid_scts = ssl_status.num_valid_scts;
284
285 blink::WebURLResponse::SignedCertificateTimestampList sct_list( 281 blink::WebURLResponse::SignedCertificateTimestampList sct_list(
286 info.signed_certificate_timestamps.size()); 282 info.signed_certificate_timestamps.size());
287 283
288 for (size_t i = 0; i < sct_list.size(); ++i) 284 for (size_t i = 0; i < sct_list.size(); ++i)
289 sct_list[i] = NetSCTToBlinkSCT(info.signed_certificate_timestamps[i]); 285 sct_list[i] = NetSCTToBlinkSCT(info.signed_certificate_timestamps[i]);
290 286
291 blink::WebURLResponse::WebSecurityDetails webSecurityDetails( 287 blink::WebURLResponse::WebSecurityDetails webSecurityDetails(
292 WebString::fromUTF8(protocol), WebString::fromUTF8(key_exchange), 288 WebString::fromUTF8(protocol), WebString::fromUTF8(key_exchange),
293 WebString::fromUTF8(cipher), WebString::fromUTF8(mac), ssl_status.cert_id, 289 WebString::fromUTF8(cipher), WebString::fromUTF8(mac), ssl_status.cert_id,
294 num_unknown_scts, num_invalid_scts, num_valid_scts, sct_list); 290 sct_list);
295 291
296 response->setSecurityDetails(webSecurityDetails); 292 response->setSecurityDetails(webSecurityDetails);
297 } 293 }
298 294
299 } // namespace 295 } // namespace
300 296
301 // This inner class exists since the WebURLLoader may be deleted while inside a 297 // This inner class exists since the WebURLLoader may be deleted while inside a
302 // call to WebURLLoaderClient. Refcounting is to keep the context from being 298 // call to WebURLLoaderClient. Refcounting is to keep the context from being
303 // deleted if it may have work to do after calling into the client. 299 // deleted if it may have work to do after calling into the client.
304 class WebURLLoaderImpl::Context : public base::RefCounted<Context> { 300 class WebURLLoaderImpl::Context : public base::RefCounted<Context> {
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 response->clearHTTPHeaderField(webStringName); 1230 response->clearHTTPHeaderField(webStringName);
1235 while (response_headers->EnumerateHeader(&iterator, name, &value)) { 1231 while (response_headers->EnumerateHeader(&iterator, name, &value)) {
1236 response->addHTTPHeaderField(webStringName, 1232 response->addHTTPHeaderField(webStringName,
1237 WebString::fromLatin1(value)); 1233 WebString::fromLatin1(value));
1238 } 1234 }
1239 } 1235 }
1240 return true; 1236 return true;
1241 } 1237 }
1242 1238
1243 } // namespace content 1239 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/security/sct-summary.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698