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

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

Issue 304053003: ServiceWorker: support Request.{url,method,origin,headers} [blink] (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test for Request. Created 6 years, 7 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/ResponseInit.h b/Source/modules/serviceworkers/RequestInit.h
similarity index 53%
copy from Source/modules/serviceworkers/ResponseInit.h
copy to Source/modules/serviceworkers/RequestInit.h
index 93c4db82fca82b9dcc53afc69b85b0c09c95b7e7..1208925df6ff9aab9df7de1dd6e0e541d7cc7bdc 100644
--- a/Source/modules/serviceworkers/ResponseInit.h
+++ b/Source/modules/serviceworkers/RequestInit.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ResponseInit_h
-#define ResponseInit_h
+#ifndef RequestInit_h
+#define RequestInit_h
#include "bindings/v8/Dictionary.h"
#include "modules/serviceworkers/HeaderMap.h"
@@ -11,21 +11,22 @@
namespace WebCore {
-struct ResponseInit {
- explicit ResponseInit(const Dictionary& options)
- : status(200)
- , statusText("OK")
+struct RequestInit {
+ explicit RequestInit(const Dictionary& options)
+ : method("GET")
{
- options.get("status", status);
- options.get("statusText", statusText);
+ options.get("url", url);
+ options.get("method", method);
+ options.get("origin", origin);
falken 2014/05/30 02:31:20 ditto, remove origin
horo 2014/05/30 04:04:04 Done.
options.get("headers", headers);
}
- unsigned short status;
- String statusText;
+ String url;
+ String method;
+ String origin;
RefPtr<HeaderMap> headers;
};
}
-#endif // ResponseInit_h
+#endif // RequestInit_h

Powered by Google App Engine
This is Rietveld 408576698