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

Unified Diff: third_party/WebKit/Source/modules/fetch/Headers.h

Issue 2840193002: fetch: Align RequestInit's |headers| with the spec. (Closed)
Patch Set: Add HeadersInit typedef Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/modules/fetch/Headers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/fetch/Headers.h
diff --git a/third_party/WebKit/Source/modules/fetch/Headers.h b/third_party/WebKit/Source/modules/fetch/Headers.h
index de5ffab206b723d49c0ca457c72beaa2148233a4..cefee608e5a9ac7d7ab8d73715724ba4f409b357 100644
--- a/third_party/WebKit/Source/modules/fetch/Headers.h
+++ b/third_party/WebKit/Source/modules/fetch/Headers.h
@@ -17,6 +17,9 @@ namespace blink {
class ByteStringSequenceSequenceOrByteStringByteStringRecordOrHeaders;
class ExceptionState;
+typedef ByteStringSequenceSequenceOrByteStringByteStringRecordOrHeaders
+ HeadersInit;
yhirano 2017/05/01 10:36:40 Though I call both "typedef", "using" is better, I
Raphael Kubo da Costa (rakuco) 2017/05/01 10:46:32 Done too :)
+
// http://fetch.spec.whatwg.org/#headers-class
class MODULES_EXPORT Headers final : public GarbageCollected<Headers>,
public ScriptWrappable,
@@ -33,9 +36,7 @@ class MODULES_EXPORT Headers final : public GarbageCollected<Headers>,
};
static Headers* Create(ExceptionState&);
- static Headers* Create(
- const ByteStringSequenceSequenceOrByteStringByteStringRecordOrHeaders&,
- ExceptionState&);
+ static Headers* Create(const HeadersInit&, ExceptionState&);
// Shares the FetchHeaderList. Called when creating a Request or Response.
static Headers* Create(FetchHeaderList*);
@@ -54,8 +55,7 @@ class MODULES_EXPORT Headers final : public GarbageCollected<Headers>,
// These methods should only be called when size() would return 0.
void FillWith(const Headers*, ExceptionState&);
- void FillWith(const Vector<Vector<String>>&, ExceptionState&);
- void FillWith(const Vector<std::pair<String, String>>&, ExceptionState&);
+ void FillWith(const HeadersInit&, ExceptionState&);
FetchHeaderList* HeaderList() const { return header_list_; }
DECLARE_TRACE();
@@ -65,6 +65,10 @@ class MODULES_EXPORT Headers final : public GarbageCollected<Headers>,
// Shares the FetchHeaderList. Called when creating a Request or Response.
explicit Headers(FetchHeaderList*);
+ // These methods should only be called when size() would return 0.
+ void FillWith(const Vector<Vector<String>>&, ExceptionState&);
+ void FillWith(const Vector<std::pair<String, String>>&, ExceptionState&);
+
Member<FetchHeaderList> header_list_;
Guard guard_;
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/Headers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698