Home | History | Annotate | Download | only in serviceworkers

Lines Matching defs:Headers

6 #include "modules/serviceworkers/Headers.h"
20 Headers* Headers::create()
22 return new Headers;
25 Headers* Headers::create(ExceptionState&)
30 Headers* Headers::create(const Headers* init, ExceptionState& exceptionState)
32 // "The Headers(|init|) constructor, when invoked, must run these steps:"
33 // "1. Let |headers| be a new Headers object."
34 Headers* headers = create();
35 // "2. If |init| is given, fill headers with |init|. Rethrow any exception."
36 headers->fillWith(init, exceptionState);
37 // "3. Return |headers|."
38 return headers;
41 Headers* Headers::create(const Dictionary& init, ExceptionState& exceptionState)
43 // "The Headers(|init|) constructor, when invoked, must run these steps:"
44 // "1. Let |headers| be a new Headers object."
45 Headers* headers = create();
46 // "2. If |init| is given, fill headers with |init|. Rethrow any exception."
47 headers->fillWith(init, exceptionState);
48 // "3. Return |headers|."
49 return headers;
52 Headers* Headers::create(FetchHeaderList* headerList)
54 return new Headers(headerList);
57 Headers* Headers::createCopy() const
60 Headers* headers = create(headerList);
61 headers->m_guard = m_guard;
62 return headers;
65 unsigned long Headers::size() const
70 void Headers::append(const String& name, const String& value, ExceptionState& exceptionState)
72 // "To append a name/value (|name|/|value|) pair to a Headers object
73 // (|headers|), run these steps:"
86 exceptionState.throwTypeError("Headers are immutable");
105 void Headers::remove(const String& name, ExceptionState& exceptionState)
115 exceptionState.throwTypeError("Headers are immutable");
134 String Headers::get(const String& name, ExceptionState& exceptionState)
149 Vector<String> Headers::getAll(const String& name, ExceptionState& exceptionState)
157 // "2. Return the values of all headers in header list whose name is |name|,
164 bool Headers::has(const String& name, ExceptionState& exceptionState)
177 void Headers::set(const String& name, const String& value, ExceptionState& exceptionState)
192 exceptionState.throwTypeError("Headers are immutable");
211 void Headers::forEach(HeadersForEachCallback* callback, const ScriptValue& thisArg)
216 void Headers::forEach(HeadersForEachCallback* callback)
221 void Headers::fillWith(const Headers* object, ExceptionState& exceptionState)
224 // "To fill a Headers object (|this|) with a given object (|object|), run
226 // "1. If |object| is a Headers object, copy its header list as
229 // |headers|. Rethrow any exception."
237 void Headers::fillWith(const Dictionary& object, ExceptionState& exceptionState)
248 // http://fetch.spec.whatwg.org/#headers-class
257 // |headers|. Rethrow any exception."
281 // 2. Append |header|'s key/|header|'s value to |headers|. Rethrow any
296 Headers::Headers()
302 Headers::Headers(FetchHeaderList* headerList)
308 void Headers::forEachInternal(HeadersForEachCallback* callback, const ScriptValue* thisArg)
321 void Headers::trace(Visitor* visitor)