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

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: rebase 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
« no previous file with comments | « Source/modules/serviceworkers/Request.idl ('k') | Source/platform/blink_platform.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..309e08f122c54f2c0bc2d28ab55934a7cbcd7036 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,20 @@
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("headers", headers);
}
- unsigned short status;
- String statusText;
+ String url;
+ String method;
RefPtr<HeaderMap> headers;
};
}
-#endif // ResponseInit_h
+#endif // RequestInit_h
« no previous file with comments | « Source/modules/serviceworkers/Request.idl ('k') | Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698