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: third_party/WebKit/Source/platform/exported/WebURLResponse.cpp

Issue 2296953004: Send certificates to devtools when it's open instead of using certId (Closed)
Patch Set: self review Created 4 years, 3 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 void WebURLResponse::setSecurityStyle(SecurityStyle securityStyle) 328 void WebURLResponse::setSecurityStyle(SecurityStyle securityStyle)
329 { 329 {
330 m_resourceResponse->setSecurityStyle(static_cast<ResourceResponse::SecurityS tyle>(securityStyle)); 330 m_resourceResponse->setSecurityStyle(static_cast<ResourceResponse::SecurityS tyle>(securityStyle));
331 } 331 }
332 332
333 void WebURLResponse::setSecurityDetails(const WebSecurityDetails& webSecurityDet ails) 333 void WebURLResponse::setSecurityDetails(const WebSecurityDetails& webSecurityDet ails)
334 { 334 {
335 blink::ResourceResponse::SignedCertificateTimestampList sctList; 335 blink::ResourceResponse::SignedCertificateTimestampList sctList;
336 for (const auto& iter : webSecurityDetails.sctList) 336 for (const auto& iter : webSecurityDetails.sctList)
337 sctList.append(static_cast<blink::ResourceResponse::SignedCertificateTim estamp>(iter)); 337 sctList.append(static_cast<blink::ResourceResponse::SignedCertificateTim estamp>(iter));
338 Vector<String> sanList;
339 sanList.append(webSecurityDetails.sanList.data(), webSecurityDetails.sanList .size());
340 Vector<AtomicString> certificate;
341 for (const auto& iter : webSecurityDetails.certificate) {
342 AtomicString cert = iter;
343 certificate.append(cert);
344 }
338 m_resourceResponse->setSecurityDetails( 345 m_resourceResponse->setSecurityDetails(
339 webSecurityDetails.protocol, 346 webSecurityDetails.protocol,
340 webSecurityDetails.keyExchange, 347 webSecurityDetails.keyExchange,
341 webSecurityDetails.cipher, 348 webSecurityDetails.cipher,
342 webSecurityDetails.mac, 349 webSecurityDetails.mac,
343 webSecurityDetails.certId, 350 webSecurityDetails.subjectName,
351 sanList,
352 webSecurityDetails.issuer,
353 static_cast<time_t>(webSecurityDetails.validFrom),
354 static_cast<time_t>(webSecurityDetails.validTo),
355 certificate,
344 sctList); 356 sctList);
345 } 357 }
346 358
347 ResourceResponse& WebURLResponse::toMutableResourceResponse() 359 ResourceResponse& WebURLResponse::toMutableResourceResponse()
348 { 360 {
349 return *m_resourceResponse; 361 return *m_resourceResponse;
350 } 362 }
351 363
352 const ResourceResponse& WebURLResponse::toResourceResponse() const 364 const ResourceResponse& WebURLResponse::toResourceResponse() const
353 { 365 {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 { 550 {
539 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData)); 551 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData));
540 } 552 }
541 553
542 WebURLResponse::WebURLResponse(ResourceResponse& r) 554 WebURLResponse::WebURLResponse(ResourceResponse& r)
543 : m_resourceResponse(&r) 555 : m_resourceResponse(&r)
544 { 556 {
545 } 557 }
546 558
547 } // namespace blink 559 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698