Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1121)

Unified Diff: third_party/WebKit/Source/platform/network/ResourceResponse.h

Issue 2516353002: Introduce url_list to the Response scheme of CacheStorage. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/network/ResourceResponse.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.h b/third_party/WebKit/Source/platform/network/ResourceResponse.h
index 17ed8f47e2a03ff33de12d45799dd922747e0855..28d9b4140a06207ebe90b83392472435fea812b5 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.h
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.h
@@ -306,14 +306,18 @@ class PLATFORM_EXPORT ResourceResponse final {
m_serviceWorkerResponseType = value;
}
- // See ServiceWorkerResponseInfo::original_url_via_service_worker.
- const KURL& originalURLViaServiceWorker() const {
- return m_originalURLViaServiceWorker;
+ // See ServiceWorkerResponseInfo::url_list_via_service_worker.
+ const Vector<KURL>& urlListViaServiceWorker() const {
+ return m_urlListViaServiceWorker;
}
- void setOriginalURLViaServiceWorker(const KURL& url) {
- m_originalURLViaServiceWorker = url;
+ void setURLListViaServiceWorker(const Vector<KURL>& urlList) {
+ m_urlListViaServiceWorker = urlList;
}
+ // Returns the last URL of urlListViaServiceWorker if exists. Otherwise
+ // returns an empty URL.
+ KURL originalURLViaServiceWorker() const;
+
const Vector<char>& multipartBoundary() const { return m_multipartBoundary; }
void setMultipartBoundary(const char* bytes, size_t size) {
m_multipartBoundary.clear();
@@ -466,9 +470,9 @@ class PLATFORM_EXPORT ResourceResponse final {
// The type of the response which was fetched by the ServiceWorker.
WebServiceWorkerResponseType m_serviceWorkerResponseType;
- // The original URL of the response which was fetched by the ServiceWorker.
+ // The URL list of the response which was fetched by the ServiceWorker.
// This may be empty if the response was created inside the ServiceWorker.
- KURL m_originalURLViaServiceWorker;
+ Vector<KURL> m_urlListViaServiceWorker;
// The cache name of the CacheStorage from where the response is served via
// the ServiceWorker. Null if the response isn't from the CacheStorage.
@@ -554,7 +558,7 @@ struct CrossThreadResourceResponseData {
bool m_wasFetchedViaForeignFetch;
bool m_wasFallbackRequiredByServiceWorker;
WebServiceWorkerResponseType m_serviceWorkerResponseType;
- KURL m_originalURLViaServiceWorker;
+ Vector<KURL> m_urlListViaServiceWorker;
String m_cacheStorageCacheName;
int64_t m_responseTime;
String m_remoteIPAddress;

Powered by Google App Engine
This is Rietveld 408576698