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

Side by Side Diff: third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponse.h

Issue 2767343004: Return const references in the Blink SW API where possible (Closed)
Patch Set: Created 3 years, 9 months 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
« no previous file with comments | « third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRequest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef WebServiceWorkerResponse_h 5 #ifndef WebServiceWorkerResponse_h
6 #define WebServiceWorkerResponse_h 6 #define WebServiceWorkerResponse_h
7 7
8 #include "public/platform/WebCommon.h" 8 #include "public/platform/WebCommon.h"
9 #include "public/platform/WebPrivatePtr.h" 9 #include "public/platform/WebPrivatePtr.h"
10 #include "public/platform/WebString.h" 10 #include "public/platform/WebString.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void reset(); 44 void reset();
45 void assign(const WebServiceWorkerResponse&); 45 void assign(const WebServiceWorkerResponse&);
46 46
47 void setURLList(const WebVector<WebURL>&); 47 void setURLList(const WebVector<WebURL>&);
48 const WebVector<WebURL>& urlList() const; 48 const WebVector<WebURL>& urlList() const;
49 49
50 void setStatus(unsigned short); 50 void setStatus(unsigned short);
51 unsigned short status() const; 51 unsigned short status() const;
52 52
53 void setStatusText(const WebString&); 53 void setStatusText(const WebString&);
54 WebString statusText() const; 54 const WebString& statusText() const;
55 55
56 void setResponseType(WebServiceWorkerResponseType); 56 void setResponseType(WebServiceWorkerResponseType);
57 WebServiceWorkerResponseType responseType() const; 57 WebServiceWorkerResponseType responseType() const;
58 58
59 void setHeader(const WebString& key, const WebString& value); 59 void setHeader(const WebString& key, const WebString& value);
60 60
61 // If the key already exists, appends the value to the same key (comma 61 // If the key already exists, appends the value to the same key (comma
62 // delimited) else creates a new entry. 62 // delimited) else creates a new entry.
63 void appendHeader(const WebString& key, const WebString& value); 63 void appendHeader(const WebString& key, const WebString& value);
64 64
65 WebVector<WebString> getHeaderKeys() const; 65 WebVector<WebString> getHeaderKeys() const;
66 WebString getHeader(const WebString& key) const; 66 WebString getHeader(const WebString& key) const;
67 void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const; 67 void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
68 68
69 void setBlob(const WebString& uuid, uint64_t size); 69 void setBlob(const WebString& uuid, uint64_t size);
70 WebString blobUUID() const; 70 WebString blobUUID() const;
71 uint64_t blobSize() const; 71 uint64_t blobSize() const;
72 72
73 void setStreamURL(const WebURL&); 73 void setStreamURL(const WebURL&);
74 WebURL streamURL() const; 74 const WebURL& streamURL() const;
75 75
76 // Provides a more detailed error when status() is zero. 76 // Provides a more detailed error when status() is zero.
77 void setError(WebServiceWorkerResponseError); 77 void setError(WebServiceWorkerResponseError);
78 WebServiceWorkerResponseError error() const; 78 WebServiceWorkerResponseError error() const;
79 79
80 void setResponseTime(int64_t); 80 void setResponseTime(int64_t);
81 int64_t responseTime() const; 81 int64_t responseTime() const;
82 82
83 void setCacheStorageCacheName(const WebString&); 83 void setCacheStorageCacheName(const WebString&);
84 WebString cacheStorageCacheName() const; 84 const WebString& cacheStorageCacheName() const;
85 85
86 void setCorsExposedHeaderNames(const WebVector<WebString>&); 86 void setCorsExposedHeaderNames(const WebVector<WebString>&);
87 WebVector<WebString> corsExposedHeaderNames() const; 87 const WebVector<WebString>& corsExposedHeaderNames() const;
88 88
89 #if INSIDE_BLINK 89 #if INSIDE_BLINK
90 const HTTPHeaderMap& headers() const; 90 const HTTPHeaderMap& headers() const;
91 91
92 void setBlobDataHandle(PassRefPtr<BlobDataHandle>); 92 void setBlobDataHandle(PassRefPtr<BlobDataHandle>);
93 PassRefPtr<BlobDataHandle> blobDataHandle() const; 93 PassRefPtr<BlobDataHandle> blobDataHandle() const;
94 #endif 94 #endif
95 95
96 private: 96 private:
97 WebPrivatePtr<WebServiceWorkerResponsePrivate> m_private; 97 WebPrivatePtr<WebServiceWorkerResponsePrivate> m_private;
98 }; 98 };
99 99
100 } // namespace blink 100 } // namespace blink
101 101
102 #endif // WebServiceWorkerResponse_h 102 #endif // WebServiceWorkerResponse_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698