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

Side by Side Diff: Source/modules/serviceworkers/Response.h

Issue 708703002: Service Worker: Cache.put() consumes request/response bodies (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Inline hasBody methods Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/serviceworkers/Request.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 Response_h 5 #ifndef Response_h
6 #define Response_h 6 #define Response_h
7 7
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "modules/serviceworkers/Body.h" 10 #include "modules/serviceworkers/Body.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 String url() const; 47 String url() const;
48 unsigned short status() const; 48 unsigned short status() const;
49 String statusText() const; 49 String statusText() const;
50 Headers* headers() const; 50 Headers* headers() const;
51 51
52 // From Response.idl: 52 // From Response.idl:
53 Response* clone() const; 53 Response* clone() const;
54 54
55 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&); 55 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&);
56 56
57 bool hasBody() const { return m_response->blobDataHandle(); }
58
57 virtual void trace(Visitor*) override; 59 virtual void trace(Visitor*) override;
58 60
59 private: 61 private:
60 explicit Response(const Response&); 62 explicit Response(const Response&);
61 explicit Response(ExecutionContext*); 63 explicit Response(ExecutionContext*);
62 Response(ExecutionContext*, FetchResponseData*); 64 Response(ExecutionContext*, FetchResponseData*);
63 65
64 virtual PassRefPtr<BlobDataHandle> blobDataHandle() override; 66 virtual PassRefPtr<BlobDataHandle> blobDataHandle() override;
65 67
66 const Member<FetchResponseData> m_response; 68 const Member<FetchResponseData> m_response;
67 const Member<Headers> m_headers; 69 const Member<Headers> m_headers;
68 }; 70 };
69 71
70 } // namespace blink 72 } // namespace blink
71 73
72 #endif // Response_h 74 #endif // Response_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/Request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698