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

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

Issue 2840193002: fetch: Align RequestInit's |headers| with the spec. (Closed)
Patch Set: Use using, not 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..125c523ef95180718a8ab1d29f8cc6dfba3c20f5 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;
+using HeadersInit =
+ ByteStringSequenceSequenceOrByteStringByteStringRecordOrHeaders;
+
// 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