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 "modules/fetch/Request.h" | 6 #include "modules/fetch/Request.h" |
7 | 7 |
8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/dom/ExecutionContext.h" | 10 #include "core/dom/ExecutionContext.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 } else { | 149 } else { |
150 if (!inputRequest) | 150 if (!inputRequest) |
151 request->setCredentials(WebURLRequest::FetchCredentialsModeOmit); | 151 request->setCredentials(WebURLRequest::FetchCredentialsModeOmit); |
152 } | 152 } |
153 | 153 |
154 // FIXME: "21. If |init|'s cache member is present, set |request|'s cache | 154 // FIXME: "21. If |init|'s cache member is present, set |request|'s cache |
155 // mode to it." | 155 // mode to it." |
156 | 156 |
157 // "22. If |init|'s redirect member is present, set |request|'s redirect | 157 // "22. If |init|'s redirect member is present, set |request|'s redirect |
158 // mode to it." | 158 // mode to it." |
159 // TODO(horo): Support redirect flag when the chromium side patch land. | 159 if (init.redirect == "follw") { |
falken
2015/08/07 07:45:18
follow
horo
2015/08/07 10:04:13
Done.
| |
160 // if (init.redirect == "follw") { | 160 request->setRedirect(WebURLRequest::FetchRedirectModeFollow); |
161 // request->setRedirect(WebURLRequest::FetchRedirectModeFollow); | 161 } else if (init.redirect == "error") { |
162 // } else if (init.redirect == "error") { | 162 request->setRedirect(WebURLRequest::FetchRedirectModeError); |
163 // request->setRedirect(WebURLRequest::FetchRedirectModeError); | 163 } else if (init.redirect == "manual") { |
164 // } else if (init.redirect == "manual") { | 164 request->setRedirect(WebURLRequest::FetchRedirectModeManual); |
165 // request->setRedirect(WebURLRequest::FetchRedirectModeManual); | 165 } |
166 // } | |
167 | 166 |
168 // FIXME: "23. If |init|'s integrity member is present, set |request|'s | 167 // FIXME: "23. If |init|'s integrity member is present, set |request|'s |
169 // integrity metadata to it." | 168 // integrity metadata to it." |
170 | 169 |
171 // "24. If |init|'s method member is present, let |method| be it and run | 170 // "24. If |init|'s method member is present, let |method| be it and run |
172 // these substeps:" | 171 // these substeps:" |
173 if (!init.method.isNull()) { | 172 if (!init.method.isNull()) { |
174 // "1. If |method| is not a method or method is a forbidden method, | 173 // "1. If |method| is not a method or method is a forbidden method, |
175 // throw a TypeError." | 174 // throw a TypeError." |
176 if (!isValidHTTPToken(init.method)) { | 175 if (!isValidHTTPToken(init.method)) { |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 } | 532 } |
534 | 533 |
535 DEFINE_TRACE(Request) | 534 DEFINE_TRACE(Request) |
536 { | 535 { |
537 Body::trace(visitor); | 536 Body::trace(visitor); |
538 visitor->trace(m_request); | 537 visitor->trace(m_request); |
539 visitor->trace(m_headers); | 538 visitor->trace(m_headers); |
540 } | 539 } |
541 | 540 |
542 } // namespace blink | 541 } // namespace blink |
OLD | NEW |