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

Side by Side Diff: third_party/WebKit/public/platform/WebURLResponse.h

Issue 2516353002: Introduce url_list to the Response scheme of CacheStorage. (Closed)
Patch Set: incorpodated cmumford@'s comment Created 4 years 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 unified diff | Download patch
OLDNEW
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // Flag whether this request was loaded using a foreign fetch service worker. 242 // Flag whether this request was loaded using a foreign fetch service worker.
243 BLINK_PLATFORM_EXPORT bool wasFetchedViaForeignFetch() const; 243 BLINK_PLATFORM_EXPORT bool wasFetchedViaForeignFetch() const;
244 BLINK_PLATFORM_EXPORT void setWasFetchedViaForeignFetch(bool); 244 BLINK_PLATFORM_EXPORT void setWasFetchedViaForeignFetch(bool);
245 245
246 // Flag whether the fallback request with skip service worker flag was 246 // Flag whether the fallback request with skip service worker flag was
247 // required. See ServiceWorkerResponseInfo::was_fallback_required() for 247 // required. See ServiceWorkerResponseInfo::was_fallback_required() for
248 // details. 248 // details.
249 BLINK_PLATFORM_EXPORT bool wasFallbackRequiredByServiceWorker() const; 249 BLINK_PLATFORM_EXPORT bool wasFallbackRequiredByServiceWorker() const;
250 BLINK_PLATFORM_EXPORT void setWasFallbackRequiredByServiceWorker(bool); 250 BLINK_PLATFORM_EXPORT void setWasFallbackRequiredByServiceWorker(bool);
251 251
252 // The type of the response which was fetched by the ServiceWorker. 252 // The type of the response which was served by the ServiceWorker.
253 BLINK_PLATFORM_EXPORT WebServiceWorkerResponseType 253 BLINK_PLATFORM_EXPORT WebServiceWorkerResponseType
254 serviceWorkerResponseType() const; 254 serviceWorkerResponseType() const;
255 BLINK_PLATFORM_EXPORT void setServiceWorkerResponseType( 255 BLINK_PLATFORM_EXPORT void setServiceWorkerResponseType(
256 WebServiceWorkerResponseType); 256 WebServiceWorkerResponseType);
257 257
258 // The URL of the Response object the ServiceWorker passed to respondWith(). 258 // The URL list of the Response object the ServiceWorker passed to
259 // See ServiceWorkerResponseInfo::original_url_via_service_worker() for 259 // respondWith(). See ServiceWorkerResponseInfo::url_list_via_service_worker()
260 // details. 260 // for details.
261 BLINK_PLATFORM_EXPORT void setURLListViaServiceWorker(
262 const WebVector<WebURL>&);
kinuko 2016/12/07 04:08:42 (not directly related to this patch, but at some p
263
264 // Returns the last URL of the URL list of the Response object the
265 // ServiceWorker passed to respondWith() if it did. Otherwise returns an empty
266 // URL.
261 BLINK_PLATFORM_EXPORT WebURL originalURLViaServiceWorker() const; 267 BLINK_PLATFORM_EXPORT WebURL originalURLViaServiceWorker() const;
262 BLINK_PLATFORM_EXPORT void setOriginalURLViaServiceWorker(const WebURL&);
263 268
264 // The boundary of the response. Set only when this is a multipart response. 269 // The boundary of the response. Set only when this is a multipart response.
265 BLINK_PLATFORM_EXPORT void setMultipartBoundary(const char* bytes, 270 BLINK_PLATFORM_EXPORT void setMultipartBoundary(const char* bytes,
266 size_t /* size */); 271 size_t /* size */);
267 272
268 // The cache name of the CacheStorage from where the response is served via 273 // The cache name of the CacheStorage from where the response is served via
269 // the ServiceWorker. Null if the response isn't from the CacheStorage. 274 // the ServiceWorker. Null if the response isn't from the CacheStorage.
270 BLINK_PLATFORM_EXPORT WebString cacheStorageCacheName() const; 275 BLINK_PLATFORM_EXPORT WebString cacheStorageCacheName() const;
271 BLINK_PLATFORM_EXPORT void setCacheStorageCacheName(const WebString&); 276 BLINK_PLATFORM_EXPORT void setCacheStorageCacheName(const WebString&);
272 277
273 // The headers that should be exposed according to CORS. Only guaranteed 278 // The headers that should be exposed according to CORS. Only guaranteed
274 // to be set if the response was fetched by a ServiceWorker. 279 // to be set if the response was served by a ServiceWorker.
275 BLINK_PLATFORM_EXPORT WebVector<WebString> corsExposedHeaderNames() const; 280 BLINK_PLATFORM_EXPORT WebVector<WebString> corsExposedHeaderNames() const;
276 BLINK_PLATFORM_EXPORT void setCorsExposedHeaderNames( 281 BLINK_PLATFORM_EXPORT void setCorsExposedHeaderNames(
277 const WebVector<WebString>&); 282 const WebVector<WebString>&);
278 283
279 // This indicates the location of a downloaded response if the 284 // This indicates the location of a downloaded response if the
280 // WebURLRequest had the downloadToFile flag set to true. This file path 285 // WebURLRequest had the downloadToFile flag set to true. This file path
281 // remains valid for the lifetime of the WebURLLoader used to create it. 286 // remains valid for the lifetime of the WebURLLoader used to create it.
282 BLINK_PLATFORM_EXPORT WebString downloadFilePath() const; 287 BLINK_PLATFORM_EXPORT WebString downloadFilePath() const;
283 BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&); 288 BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&);
284 289
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // instance it contains. 333 // instance it contains.
329 std::unique_ptr<ResourceResponseContainer> m_ownedResourceResponse; 334 std::unique_ptr<ResourceResponseContainer> m_ownedResourceResponse;
330 335
331 // Should never be null. 336 // Should never be null.
332 ResourceResponse* m_resourceResponse; 337 ResourceResponse* m_resourceResponse;
333 }; 338 };
334 339
335 } // namespace blink 340 } // namespace blink
336 341
337 #endif 342 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698