OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "Request.h" | 6 #include "Request.h" |
7 | 7 |
8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
10 #include "core/fetch/FetchUtils.h" | 10 #include "core/fetch/FetchUtils.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 FillWebRequestHeaders(WebServiceWorkerRequest* webRequest) : m_webRequest(we
bRequest) { } | 29 FillWebRequestHeaders(WebServiceWorkerRequest* webRequest) : m_webRequest(we
bRequest) { } |
30 | 30 |
31 virtual bool handleItem(ScriptValue, const String&, const String&, Headers*) | 31 virtual bool handleItem(ScriptValue, const String&, const String&, Headers*) |
32 { | 32 { |
33 ASSERT_NOT_REACHED(); | 33 ASSERT_NOT_REACHED(); |
34 return false; | 34 return false; |
35 } | 35 } |
36 | 36 |
37 virtual bool handleItem(const String& value, const String& key, Headers*) | 37 virtual bool handleItem(const String& value, const String& key, Headers*) |
38 { | 38 { |
39 m_webRequest->setHeader(key, value); | 39 m_webRequest->appendHeader(key, value); |
40 return true; | 40 return true; |
41 } | 41 } |
42 | 42 |
43 private: | 43 private: |
44 WebServiceWorkerRequest* m_webRequest; | 44 WebServiceWorkerRequest* m_webRequest; |
45 }; | 45 }; |
46 | 46 |
47 Request* createRequestWithRequestData(ExecutionContext* context, FetchRequestDat
a* request, const RequestInit& init, FetchRequestData::Mode mode, FetchRequestDa
ta::Credentials credentials, ExceptionState& exceptionState) | 47 Request* createRequestWithRequestData(ExecutionContext* context, FetchRequestDat
a* request, const RequestInit& init, FetchRequestData::Mode mode, FetchRequestDa
ta::Credentials credentials, ExceptionState& exceptionState) |
48 { | 48 { |
49 // "7. Let |mode| be |init|'s mode member if it is present, and | 49 // "7. Let |mode| be |init|'s mode member if it is present, and |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 } | 325 } |
326 | 326 |
327 void Request::trace(Visitor* visitor) | 327 void Request::trace(Visitor* visitor) |
328 { | 328 { |
329 Body::trace(visitor); | 329 Body::trace(visitor); |
330 visitor->trace(m_request); | 330 visitor->trace(m_request); |
331 visitor->trace(m_headers); | 331 visitor->trace(m_headers); |
332 } | 332 } |
333 | 333 |
334 } // namespace blink | 334 } // namespace blink |
OLD | NEW |