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

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

Issue 329853012: [ServiceWorker] Make Request class better conformance with the spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated jochen's comment Created 6 years, 5 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 8e8461b60a4fc384a0d175ab6e82185f08cb8906..2b261423c93695946eb48a53f2c236c00406f555 100644
--- a/Source/modules/serviceworkers/RequestInit.h
+++ b/Source/modules/serviceworkers/RequestInit.h
@@ -6,24 +6,28 @@
#define RequestInit_h
#include "bindings/core/v8/Dictionary.h"
-#include "modules/serviceworkers/HeaderMap.h"
+#include "modules/serviceworkers/Headers.h"
#include "wtf/RefPtr.h"
namespace WebCore {
struct RequestInit {
explicit RequestInit(const Dictionary& options)
- : method("GET")
{
- options.get("url", url);
- // FIXME: Spec uses ByteString for method. http://crbug.com/347426
- options.get("method", method);
- options.get("headers", headers);
+ options.get("method", m_method);
+ options.get("headers", m_headers);
+ if (!m_headers) {
+ options.get("headers", m_headersDictionary);
+ }
+ options.get("mode", m_mode);
+ options.get("credentials", m_credentials);
}
- String url;
- String method;
- RefPtr<HeaderMap> headers;
+ String m_method;
+ RefPtr<Headers> m_headers;
+ Dictionary m_headersDictionary;
+ String m_mode;
+ String m_credentials;
};
}

Powered by Google App Engine
This is Rietveld 408576698