OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 m_wasFallbackRequiredByServiceWorker = value; | 299 m_wasFallbackRequiredByServiceWorker = value; |
300 } | 300 } |
301 | 301 |
302 WebServiceWorkerResponseType serviceWorkerResponseType() const { | 302 WebServiceWorkerResponseType serviceWorkerResponseType() const { |
303 return m_serviceWorkerResponseType; | 303 return m_serviceWorkerResponseType; |
304 } | 304 } |
305 void setServiceWorkerResponseType(WebServiceWorkerResponseType value) { | 305 void setServiceWorkerResponseType(WebServiceWorkerResponseType value) { |
306 m_serviceWorkerResponseType = value; | 306 m_serviceWorkerResponseType = value; |
307 } | 307 } |
308 | 308 |
309 // See ServiceWorkerResponseInfo::original_url_via_service_worker. | 309 // See ServiceWorkerResponseInfo::url_list_via_service_worker. |
310 const KURL& originalURLViaServiceWorker() const { | 310 const Vector<KURL>& urlListViaServiceWorker() const { |
311 return m_originalURLViaServiceWorker; | 311 return m_urlListViaServiceWorker; |
312 } | 312 } |
313 void setOriginalURLViaServiceWorker(const KURL& url) { | 313 void setURLListViaServiceWorker(const Vector<KURL>& urlList) { |
314 m_originalURLViaServiceWorker = url; | 314 m_urlListViaServiceWorker = urlList; |
315 } | 315 } |
316 | 316 |
| 317 // Returns the last URL of urlListViaServiceWorker if exists. Otherwise |
| 318 // returns an empty URL. |
| 319 KURL originalURLViaServiceWorker() const; |
| 320 |
317 const Vector<char>& multipartBoundary() const { return m_multipartBoundary; } | 321 const Vector<char>& multipartBoundary() const { return m_multipartBoundary; } |
318 void setMultipartBoundary(const char* bytes, size_t size) { | 322 void setMultipartBoundary(const char* bytes, size_t size) { |
319 m_multipartBoundary.clear(); | 323 m_multipartBoundary.clear(); |
320 m_multipartBoundary.append(bytes, size); | 324 m_multipartBoundary.append(bytes, size); |
321 } | 325 } |
322 | 326 |
323 const String& cacheStorageCacheName() const { | 327 const String& cacheStorageCacheName() const { |
324 return m_cacheStorageCacheName; | 328 return m_cacheStorageCacheName; |
325 } | 329 } |
326 void setCacheStorageCacheName(const String& cacheStorageCacheName) { | 330 void setCacheStorageCacheName(const String& cacheStorageCacheName) { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 | 463 |
460 // Was the resource fetched using a foreign fetch service worker. | 464 // Was the resource fetched using a foreign fetch service worker. |
461 bool m_wasFetchedViaForeignFetch; | 465 bool m_wasFetchedViaForeignFetch; |
462 | 466 |
463 // Was the fallback request with skip service worker flag required. | 467 // Was the fallback request with skip service worker flag required. |
464 bool m_wasFallbackRequiredByServiceWorker; | 468 bool m_wasFallbackRequiredByServiceWorker; |
465 | 469 |
466 // The type of the response which was fetched by the ServiceWorker. | 470 // The type of the response which was fetched by the ServiceWorker. |
467 WebServiceWorkerResponseType m_serviceWorkerResponseType; | 471 WebServiceWorkerResponseType m_serviceWorkerResponseType; |
468 | 472 |
469 // The original URL of the response which was fetched by the ServiceWorker. | 473 // The URL list of the response which was fetched by the ServiceWorker. |
470 // This may be empty if the response was created inside the ServiceWorker. | 474 // This may be empty if the response was created inside the ServiceWorker. |
471 KURL m_originalURLViaServiceWorker; | 475 Vector<KURL> m_urlListViaServiceWorker; |
472 | 476 |
473 // The cache name of the CacheStorage from where the response is served via | 477 // The cache name of the CacheStorage from where the response is served via |
474 // the ServiceWorker. Null if the response isn't from the CacheStorage. | 478 // the ServiceWorker. Null if the response isn't from the CacheStorage. |
475 String m_cacheStorageCacheName; | 479 String m_cacheStorageCacheName; |
476 | 480 |
477 // The headers that should be exposed according to CORS. Only guaranteed | 481 // The headers that should be exposed according to CORS. Only guaranteed |
478 // to be set if the response was fetched by a ServiceWorker. | 482 // to be set if the response was fetched by a ServiceWorker. |
479 Vector<String> m_corsExposedHeaderNames; | 483 Vector<String> m_corsExposedHeaderNames; |
480 | 484 |
481 // The time at which the response headers were received. For cached | 485 // The time at which the response headers were received. For cached |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 KURL m_appCacheManifestURL; | 551 KURL m_appCacheManifestURL; |
548 Vector<char> m_multipartBoundary; | 552 Vector<char> m_multipartBoundary; |
549 bool m_wasFetchedViaSPDY; | 553 bool m_wasFetchedViaSPDY; |
550 bool m_wasNpnNegotiated; | 554 bool m_wasNpnNegotiated; |
551 bool m_wasAlternateProtocolAvailable; | 555 bool m_wasAlternateProtocolAvailable; |
552 bool m_wasFetchedViaProxy; | 556 bool m_wasFetchedViaProxy; |
553 bool m_wasFetchedViaServiceWorker; | 557 bool m_wasFetchedViaServiceWorker; |
554 bool m_wasFetchedViaForeignFetch; | 558 bool m_wasFetchedViaForeignFetch; |
555 bool m_wasFallbackRequiredByServiceWorker; | 559 bool m_wasFallbackRequiredByServiceWorker; |
556 WebServiceWorkerResponseType m_serviceWorkerResponseType; | 560 WebServiceWorkerResponseType m_serviceWorkerResponseType; |
557 KURL m_originalURLViaServiceWorker; | 561 Vector<KURL> m_urlListViaServiceWorker; |
558 String m_cacheStorageCacheName; | 562 String m_cacheStorageCacheName; |
559 int64_t m_responseTime; | 563 int64_t m_responseTime; |
560 String m_remoteIPAddress; | 564 String m_remoteIPAddress; |
561 unsigned short m_remotePort; | 565 unsigned short m_remotePort; |
562 long long m_encodedDataLength; | 566 long long m_encodedDataLength; |
563 long long m_encodedBodyLength; | 567 long long m_encodedBodyLength; |
564 long long m_decodedBodyLength; | 568 long long m_decodedBodyLength; |
565 String m_downloadedFilePath; | 569 String m_downloadedFilePath; |
566 RefPtr<BlobDataHandle> m_downloadedFileHandle; | 570 RefPtr<BlobDataHandle> m_downloadedFileHandle; |
567 }; | 571 }; |
568 | 572 |
569 } // namespace blink | 573 } // namespace blink |
570 | 574 |
571 #endif // ResourceResponse_h | 575 #endif // ResourceResponse_h |
OLD | NEW |