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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 return static_cast<WebSecurityStyle>(m_resourceResponse->getSecurityStyle()); | 272 return static_cast<WebSecurityStyle>(m_resourceResponse->getSecurityStyle()); |
273 } | 273 } |
274 | 274 |
275 void WebURLResponse::setSecurityStyle(WebSecurityStyle securityStyle) { | 275 void WebURLResponse::setSecurityStyle(WebSecurityStyle securityStyle) { |
276 m_resourceResponse->setSecurityStyle( | 276 m_resourceResponse->setSecurityStyle( |
277 static_cast<ResourceResponse::SecurityStyle>(securityStyle)); | 277 static_cast<ResourceResponse::SecurityStyle>(securityStyle)); |
278 } | 278 } |
279 | 279 |
280 void WebURLResponse::setSecurityDetails( | 280 void WebURLResponse::setSecurityDetails( |
281 const WebSecurityDetails& webSecurityDetails) { | 281 const WebSecurityDetails& webSecurityDetails) { |
282 blink::ResourceResponse::SignedCertificateTimestampList sctList; | 282 ResourceResponse::SignedCertificateTimestampList sctList; |
283 for (const auto& iter : webSecurityDetails.sctList) | 283 for (const auto& iter : webSecurityDetails.sctList) { |
284 sctList.append( | 284 sctList.append( |
285 static_cast<blink::ResourceResponse::SignedCertificateTimestamp>(iter)); | 285 static_cast<ResourceResponse::SignedCertificateTimestamp>(iter)); |
| 286 } |
286 Vector<String> sanList; | 287 Vector<String> sanList; |
287 sanList.append(webSecurityDetails.sanList.data(), | 288 sanList.append(webSecurityDetails.sanList.data(), |
288 webSecurityDetails.sanList.size()); | 289 webSecurityDetails.sanList.size()); |
289 Vector<AtomicString> certificate; | 290 Vector<AtomicString> certificate; |
290 for (const auto& iter : webSecurityDetails.certificate) { | 291 for (const auto& iter : webSecurityDetails.certificate) { |
291 AtomicString cert = iter; | 292 AtomicString cert = iter; |
292 certificate.append(cert); | 293 certificate.append(cert); |
293 } | 294 } |
294 m_resourceResponse->setSecurityDetails( | 295 m_resourceResponse->setSecurityDetails( |
295 webSecurityDetails.protocol, webSecurityDetails.keyExchange, | 296 webSecurityDetails.protocol, webSecurityDetails.keyExchange, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 | 367 |
367 WebServiceWorkerResponseType WebURLResponse::serviceWorkerResponseType() const { | 368 WebServiceWorkerResponseType WebURLResponse::serviceWorkerResponseType() const { |
368 return m_resourceResponse->serviceWorkerResponseType(); | 369 return m_resourceResponse->serviceWorkerResponseType(); |
369 } | 370 } |
370 | 371 |
371 void WebURLResponse::setServiceWorkerResponseType( | 372 void WebURLResponse::setServiceWorkerResponseType( |
372 WebServiceWorkerResponseType value) { | 373 WebServiceWorkerResponseType value) { |
373 m_resourceResponse->setServiceWorkerResponseType(value); | 374 m_resourceResponse->setServiceWorkerResponseType(value); |
374 } | 375 } |
375 | 376 |
| 377 void WebURLResponse::setURLListViaServiceWorker( |
| 378 const WebVector<WebURL>& urlListViaServiceWorker) { |
| 379 Vector<KURL> urlList(urlListViaServiceWorker.size()); |
| 380 std::transform(urlListViaServiceWorker.begin(), urlListViaServiceWorker.end(), |
| 381 urlList.begin(), [](const WebURL& url) { return url; }); |
| 382 m_resourceResponse->setURLListViaServiceWorker(urlList); |
| 383 } |
| 384 |
376 WebURL WebURLResponse::originalURLViaServiceWorker() const { | 385 WebURL WebURLResponse::originalURLViaServiceWorker() const { |
377 return m_resourceResponse->originalURLViaServiceWorker(); | 386 return m_resourceResponse->originalURLViaServiceWorker(); |
378 } | 387 } |
379 | 388 |
380 void WebURLResponse::setOriginalURLViaServiceWorker(const WebURL& url) { | |
381 m_resourceResponse->setOriginalURLViaServiceWorker(url); | |
382 } | |
383 | |
384 void WebURLResponse::setMultipartBoundary(const char* bytes, size_t size) { | 389 void WebURLResponse::setMultipartBoundary(const char* bytes, size_t size) { |
385 m_resourceResponse->setMultipartBoundary(bytes, size); | 390 m_resourceResponse->setMultipartBoundary(bytes, size); |
386 } | 391 } |
387 | 392 |
388 WebString WebURLResponse::cacheStorageCacheName() const { | 393 WebString WebURLResponse::cacheStorageCacheName() const { |
389 return m_resourceResponse->cacheStorageCacheName(); | 394 return m_resourceResponse->cacheStorageCacheName(); |
390 } | 395 } |
391 | 396 |
392 void WebURLResponse::setCacheStorageCacheName( | 397 void WebURLResponse::setCacheStorageCacheName( |
393 const WebString& cacheStorageCacheName) { | 398 const WebString& cacheStorageCacheName) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData)); | 465 m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData)); |
461 } | 466 } |
462 | 467 |
463 void WebURLResponse::appendRedirectResponse(const WebURLResponse& response) { | 468 void WebURLResponse::appendRedirectResponse(const WebURLResponse& response) { |
464 m_resourceResponse->appendRedirectResponse(response.toResourceResponse()); | 469 m_resourceResponse->appendRedirectResponse(response.toResourceResponse()); |
465 } | 470 } |
466 | 471 |
467 WebURLResponse::WebURLResponse(ResourceResponse& r) : m_resourceResponse(&r) {} | 472 WebURLResponse::WebURLResponse(ResourceResponse& r) : m_resourceResponse(&r) {} |
468 | 473 |
469 } // namespace blink | 474 } // namespace blink |
OLD | NEW |