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" |
11 #include "core/fetch/FetchUtils.h" | 11 #include "core/fetch/FetchUtils.h" |
12 #include "core/fetch/ResourceLoaderOptions.h" | 12 #include "core/fetch/ResourceLoaderOptions.h" |
13 #include "core/inspector/ConsoleMessage.h" | |
13 #include "core/loader/ThreadableLoader.h" | 14 #include "core/loader/ThreadableLoader.h" |
14 #include "modules/fetch/BodyStreamBuffer.h" | 15 #include "modules/fetch/BodyStreamBuffer.h" |
15 #include "modules/fetch/FetchBlobDataConsumerHandle.h" | 16 #include "modules/fetch/FetchBlobDataConsumerHandle.h" |
16 #include "modules/fetch/FetchManager.h" | 17 #include "modules/fetch/FetchManager.h" |
17 #include "modules/fetch/RequestInit.h" | 18 #include "modules/fetch/RequestInit.h" |
18 #include "platform/network/HTTPParsers.h" | 19 #include "platform/network/HTTPParsers.h" |
19 #include "platform/network/ResourceRequest.h" | 20 #include "platform/network/ResourceRequest.h" |
20 #include "platform/weborigin/Referrer.h" | 21 #include "platform/weborigin/Referrer.h" |
21 #include "public/platform/WebServiceWorkerRequest.h" | 22 #include "public/platform/WebServiceWorkerRequest.h" |
22 #include "public/platform/WebURLRequest.h" | 23 #include "public/platform/WebURLRequest.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 // The url attribute's getter must return request's url, serialized with the exclude fragment flag set. | 335 // The url attribute's getter must return request's url, serialized with the exclude fragment flag set. |
335 if (!m_request->url().hasFragmentIdentifier()) | 336 if (!m_request->url().hasFragmentIdentifier()) |
336 return m_request->url(); | 337 return m_request->url(); |
337 KURL url(m_request->url()); | 338 KURL url(m_request->url()); |
338 url.removeFragmentIdentifier(); | 339 url.removeFragmentIdentifier(); |
339 return url; | 340 return url; |
340 } | 341 } |
341 | 342 |
342 String Request::context() const | 343 String Request::context() const |
343 { | 344 { |
345 executionContext()->addConsoleMessage(ConsoleMessage::create(DeprecationMess ageSource, WarningMessageLevel, "Request.context is deprecated and will be remov ed in M46.")); | |
falken
2015/08/13 11:37:19
Deprecation messages are usually added to UseCount
hiroshige
2015/08/13 11:39:10
Hmm, so we should add a new use counter and corres
falken
2015/08/13 11:45:11
I think that's the convention, that's what I did f
hiroshige
2015/08/13 12:01:23
Done.
| |
346 | |
344 // "The context attribute's getter must return request's context" | 347 // "The context attribute's getter must return request's context" |
345 switch (m_request->context()) { | 348 switch (m_request->context()) { |
346 case WebURLRequest::RequestContextUnspecified: | 349 case WebURLRequest::RequestContextUnspecified: |
347 return ""; | 350 return ""; |
348 case WebURLRequest::RequestContextAudio: | 351 case WebURLRequest::RequestContextAudio: |
349 return "audio"; | 352 return "audio"; |
350 case WebURLRequest::RequestContextBeacon: | 353 case WebURLRequest::RequestContextBeacon: |
351 return "beacon"; | 354 return "beacon"; |
352 case WebURLRequest::RequestContextCSPReport: | 355 case WebURLRequest::RequestContextCSPReport: |
353 return "cspreport"; | 356 return "cspreport"; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
527 } | 530 } |
528 | 531 |
529 DEFINE_TRACE(Request) | 532 DEFINE_TRACE(Request) |
530 { | 533 { |
531 Body::trace(visitor); | 534 Body::trace(visitor); |
532 visitor->trace(m_request); | 535 visitor->trace(m_request); |
533 visitor->trace(m_headers); | 536 visitor->trace(m_headers); |
534 } | 537 } |
535 | 538 |
536 } // namespace blink | 539 } // namespace blink |
OLD | NEW |