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