Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 316 return static_cast<SecurityStyle>(m_private->m_resourceResponse->getSecurity Style()); | 316 return static_cast<SecurityStyle>(m_private->m_resourceResponse->getSecurity Style()); |
| 317 } | 317 } |
| 318 | 318 |
| 319 void WebURLResponse::setSecurityStyle(SecurityStyle securityStyle) | 319 void WebURLResponse::setSecurityStyle(SecurityStyle securityStyle) |
| 320 { | 320 { |
| 321 m_private->m_resourceResponse->setSecurityStyle(static_cast<ResourceResponse ::SecurityStyle>(securityStyle)); | 321 m_private->m_resourceResponse->setSecurityStyle(static_cast<ResourceResponse ::SecurityStyle>(securityStyle)); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void WebURLResponse::setSecurityDetails(const WebSecurityDetails& webSecurityDet ails) | 324 void WebURLResponse::setSecurityDetails(const WebSecurityDetails& webSecurityDet ails) |
| 325 { | 325 { |
| 326 blink::ResourceResponse::SignedCertificateTimestampList sctList; | |
| 327 for (const auto& iter : webSecurityDetails.sctList) | |
| 328 sctList.append(static_cast<blink::ResourceResponse::SignedCertificateTim estamp>(iter)); | |
|
Mike West
2016/06/23 16:32:30
It surprises me a little bit that this works. You'
| |
| 326 m_private->m_resourceResponse->setSecurityDetails( | 329 m_private->m_resourceResponse->setSecurityDetails( |
| 327 webSecurityDetails.protocol, | 330 webSecurityDetails.protocol, |
| 328 webSecurityDetails.keyExchange, | 331 webSecurityDetails.keyExchange, |
| 329 webSecurityDetails.cipher, | 332 webSecurityDetails.cipher, |
| 330 webSecurityDetails.mac, | 333 webSecurityDetails.mac, |
| 331 webSecurityDetails.certId, | 334 webSecurityDetails.certId, |
| 332 webSecurityDetails.numUnknownScts, | 335 webSecurityDetails.numUnknownScts, |
| 333 webSecurityDetails.numInvalidScts, | 336 webSecurityDetails.numInvalidScts, |
| 334 webSecurityDetails.numValidScts); | 337 webSecurityDetails.numValidScts, |
| 338 sctList); | |
| 335 } | 339 } |
| 336 | 340 |
| 337 ResourceResponse& WebURLResponse::toMutableResourceResponse() | 341 ResourceResponse& WebURLResponse::toMutableResourceResponse() |
| 338 { | 342 { |
| 339 ASSERT(m_private); | 343 ASSERT(m_private); |
| 340 ASSERT(m_private->m_resourceResponse); | 344 ASSERT(m_private->m_resourceResponse); |
| 341 | 345 |
| 342 return *m_private->m_resourceResponse; | 346 return *m_private->m_resourceResponse; |
| 343 } | 347 } |
| 344 | 348 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 510 // Subclasses may call this directly so a self-assignment check is needed | 514 // Subclasses may call this directly so a self-assignment check is needed |
| 511 // here as well as in the public assign method. | 515 // here as well as in the public assign method. |
| 512 if (m_private == p) | 516 if (m_private == p) |
| 513 return; | 517 return; |
| 514 if (m_private) | 518 if (m_private) |
| 515 m_private->dispose(); | 519 m_private->dispose(); |
| 516 m_private = p; | 520 m_private = p; |
| 517 } | 521 } |
| 518 | 522 |
| 519 } // namespace blink | 523 } // namespace blink |
| OLD | NEW |