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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebServiceWorkerResponse.cpp

Issue 2516353002: Introduce url_list to the Response scheme of CacheStorage. (Closed)
Patch Set: 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" 5 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h"
6 6
7 #include "platform/blob/BlobData.h" 7 #include "platform/blob/BlobData.h"
8 #include "platform/network/HTTPHeaderMap.h" 8 #include "platform/network/HTTPHeaderMap.h"
9 #include "public/platform/WebHTTPHeaderVisitor.h" 9 #include "public/platform/WebHTTPHeaderVisitor.h"
10 #include "wtf/HashMap.h" 10 #include "wtf/HashMap.h"
11 #include "wtf/RefCounted.h" 11 #include "wtf/RefCounted.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class WebServiceWorkerResponsePrivate 15 class WebServiceWorkerResponsePrivate
16 : public RefCounted<WebServiceWorkerResponsePrivate> { 16 : public RefCounted<WebServiceWorkerResponsePrivate> {
17 public: 17 public:
18 WebServiceWorkerResponsePrivate() 18 WebServiceWorkerResponsePrivate()
19 : status(0), 19 : status(0),
20 responseType(WebServiceWorkerResponseTypeDefault), 20 responseType(WebServiceWorkerResponseTypeDefault),
21 error(WebServiceWorkerResponseErrorUnknown), 21 error(WebServiceWorkerResponseErrorUnknown),
22 responseTime(0) {} 22 responseTime(0) {}
23 WebURL url; 23 WebVector<WebURL> urlList;
24 unsigned short status; 24 unsigned short status;
25 WebString statusText; 25 WebString statusText;
26 WebServiceWorkerResponseType responseType; 26 WebServiceWorkerResponseType responseType;
27 HTTPHeaderMap headers; 27 HTTPHeaderMap headers;
28 RefPtr<BlobDataHandle> blobDataHandle; 28 RefPtr<BlobDataHandle> blobDataHandle;
29 WebURL streamURL; 29 WebURL streamURL;
30 WebServiceWorkerResponseError error; 30 WebServiceWorkerResponseError error;
31 int64_t responseTime; 31 int64_t responseTime;
32 WebString cacheStorageCacheName; 32 WebString cacheStorageCacheName;
33 WebVector<WebString> corsExposedHeaderNames; 33 WebVector<WebString> corsExposedHeaderNames;
34 }; 34 };
35 35
36 WebServiceWorkerResponse::WebServiceWorkerResponse() 36 WebServiceWorkerResponse::WebServiceWorkerResponse()
37 : m_private(adoptRef(new WebServiceWorkerResponsePrivate)) {} 37 : m_private(adoptRef(new WebServiceWorkerResponsePrivate)) {}
38 38
39 void WebServiceWorkerResponse::reset() { 39 void WebServiceWorkerResponse::reset() {
40 m_private.reset(); 40 m_private.reset();
41 } 41 }
42 42
43 void WebServiceWorkerResponse::assign(const WebServiceWorkerResponse& other) { 43 void WebServiceWorkerResponse::assign(const WebServiceWorkerResponse& other) {
44 m_private = other.m_private; 44 m_private = other.m_private;
45 } 45 }
46 46
47 void WebServiceWorkerResponse::setURL(const WebURL& url) { 47 void WebServiceWorkerResponse::setURLList(const WebVector<WebURL>& urlList) {
48 m_private->url = url; 48 m_private->urlList = urlList;
49 } 49 }
50 50
51 WebURL WebServiceWorkerResponse::url() const { 51 const WebVector<WebURL>& WebServiceWorkerResponse::urlList() const {
52 return m_private->url; 52 return m_private->urlList;
53 } 53 }
54 54
55 void WebServiceWorkerResponse::setStatus(unsigned short status) { 55 void WebServiceWorkerResponse::setStatus(unsigned short status) {
56 m_private->status = status; 56 m_private->status = status;
57 } 57 }
58 58
59 unsigned short WebServiceWorkerResponse::status() const { 59 unsigned short WebServiceWorkerResponse::status() const {
60 return m_private->status; 60 return m_private->status;
61 } 61 }
62 62
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void WebServiceWorkerResponse::setBlobDataHandle( 177 void WebServiceWorkerResponse::setBlobDataHandle(
178 PassRefPtr<BlobDataHandle> blobDataHandle) { 178 PassRefPtr<BlobDataHandle> blobDataHandle) {
179 m_private->blobDataHandle = blobDataHandle; 179 m_private->blobDataHandle = blobDataHandle;
180 } 180 }
181 181
182 PassRefPtr<BlobDataHandle> WebServiceWorkerResponse::blobDataHandle() const { 182 PassRefPtr<BlobDataHandle> WebServiceWorkerResponse::blobDataHandle() const {
183 return m_private->blobDataHandle; 183 return m_private->blobDataHandle;
184 } 184 }
185 185
186 } // namespace blink 186 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698