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

Side by Side Diff: Source/modules/serviceworkers/Request.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/CacheTest.cpp ('k') | Source/modules/serviceworkers/Response.h » ('j') | 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 Request_h 5 #ifndef Request_h
6 #define Request_h 6 #define Request_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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 Headers* headers() const { return m_headers; } 42 Headers* headers() const { return m_headers; }
43 String referrer() const; 43 String referrer() const;
44 String mode() const; 44 String mode() const;
45 String credentials() const; 45 String credentials() const;
46 46
47 Request* clone() const; 47 Request* clone() const;
48 48
49 void populateWebServiceWorkerRequest(WebServiceWorkerRequest&) const; 49 void populateWebServiceWorkerRequest(WebServiceWorkerRequest&) const;
50 50
51 void setBodyBlobHandle(PassRefPtr<BlobDataHandle>); 51 void setBodyBlobHandle(PassRefPtr<BlobDataHandle>);
52 bool hasBody() const { return m_request->blobDataHandle(); }
52 53
53 virtual void trace(Visitor*) override; 54 virtual void trace(Visitor*) override;
54 55
55 private: 56 private:
56 explicit Request(const Request&); 57 explicit Request(const Request&);
57 Request(ExecutionContext*, FetchRequestData*); 58 Request(ExecutionContext*, FetchRequestData*);
58 Request(ExecutionContext*, const WebServiceWorkerRequest&); 59 Request(ExecutionContext*, const WebServiceWorkerRequest&);
59 60
60 static Request* createRequestWithRequestData(ExecutionContext*, FetchRequest Data*, const RequestInit&, WebURLRequest::FetchRequestMode, WebURLRequest::Fetch CredentialsMode, ExceptionState&); 61 static Request* createRequestWithRequestData(ExecutionContext*, FetchRequest Data*, const RequestInit&, WebURLRequest::FetchRequestMode, WebURLRequest::Fetch CredentialsMode, ExceptionState&);
61 void clearHeaderList(); 62 void clearHeaderList();
62 63
63 virtual PassRefPtr<BlobDataHandle> blobDataHandle() override; 64 virtual PassRefPtr<BlobDataHandle> blobDataHandle() override;
64 65
65 const Member<FetchRequestData> m_request; 66 const Member<FetchRequestData> m_request;
66 const Member<Headers> m_headers; 67 const Member<Headers> m_headers;
67 }; 68 };
68 69
69 } // namespace blink 70 } // namespace blink
70 71
71 #endif // Request_h 72 #endif // Request_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/CacheTest.cpp ('k') | Source/modules/serviceworkers/Response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698