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

Unified Diff: Source/modules/serviceworkers/RequestInit.h

Issue 516603004: [ServiceWorker] Support setting body to Request object in ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated yhirano's comment Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/serviceworkers/RequestInit.h
diff --git a/Source/modules/serviceworkers/RequestInit.h b/Source/modules/serviceworkers/RequestInit.h
index ac6b82b8041cee05022aef37a12b98bb8c6d78f0..59b9aac6e7526ffcd2cdc0fc6c979412e0416aa2 100644
--- a/Source/modules/serviceworkers/RequestInit.h
+++ b/Source/modules/serviceworkers/RequestInit.h
@@ -6,29 +6,25 @@
#define RequestInit_h
#include "bindings/core/v8/Dictionary.h"
-#include "modules/serviceworkers/Headers.h"
#include "platform/heap/Handle.h"
#include "wtf/RefPtr.h"
+#include "wtf/text/WTFString.h"
namespace blink {
+class BlobDataHandle;
+class ExceptionState;
+class Headers;
+
class RequestInit {
STACK_ALLOCATED();
public:
- explicit RequestInit(const Dictionary& options)
- {
- DictionaryHelper::get(options, "method", method);
- DictionaryHelper::get(options, "headers", headers);
- if (!headers) {
- DictionaryHelper::get(options, "headers", headersDictionary);
- }
- DictionaryHelper::get(options, "mode", mode);
- DictionaryHelper::get(options, "credentials", credentials);
- }
+ explicit RequestInit(ExecutionContext*, const Dictionary&, ExceptionState&);
String method;
RefPtrWillBeMember<Headers> headers;
Dictionary headersDictionary;
+ RefPtr<BlobDataHandle> bodyBlobHandle;
String mode;
String credentials;
};

Powered by Google App Engine
This is Rietveld 408576698