OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "web/WebAssociatedURLLoaderImpl.h" | 31 #include "web/WebAssociatedURLLoaderImpl.h" |
32 | 32 |
| 33 #include <limits.h> |
| 34 #include <memory> |
33 #include "core/dom/ContextLifecycleObserver.h" | 35 #include "core/dom/ContextLifecycleObserver.h" |
34 #include "core/dom/TaskRunnerHelper.h" | 36 #include "core/dom/TaskRunnerHelper.h" |
35 #include "core/loader/DocumentThreadableLoader.h" | 37 #include "core/loader/DocumentThreadableLoader.h" |
36 #include "core/loader/DocumentThreadableLoaderClient.h" | 38 #include "core/loader/DocumentThreadableLoaderClient.h" |
37 #include "platform/Timer.h" | 39 #include "platform/Timer.h" |
38 #include "platform/exported/WrappedResourceRequest.h" | 40 #include "platform/exported/WrappedResourceRequest.h" |
39 #include "platform/exported/WrappedResourceResponse.h" | 41 #include "platform/exported/WrappedResourceResponse.h" |
40 #include "platform/loader/fetch/CrossOriginAccessControl.h" | 42 #include "platform/loader/fetch/CrossOriginAccessControl.h" |
41 #include "platform/loader/fetch/FetchUtils.h" | 43 #include "platform/loader/fetch/FetchUtils.h" |
42 #include "platform/network/HTTPParsers.h" | 44 #include "platform/network/HTTPParsers.h" |
43 #include "platform/network/ResourceError.h" | 45 #include "platform/network/ResourceError.h" |
44 #include "public/platform/WebHTTPHeaderVisitor.h" | 46 #include "public/platform/WebHTTPHeaderVisitor.h" |
45 #include "public/platform/WebString.h" | 47 #include "public/platform/WebString.h" |
46 #include "public/platform/WebURLError.h" | 48 #include "public/platform/WebURLError.h" |
47 #include "public/platform/WebURLRequest.h" | 49 #include "public/platform/WebURLRequest.h" |
48 #include "public/web/WebAssociatedURLLoaderClient.h" | 50 #include "public/web/WebAssociatedURLLoaderClient.h" |
49 #include "public/web/WebDataSource.h" | 51 #include "public/web/WebDataSource.h" |
50 #include "web/WebLocalFrameImpl.h" | 52 #include "web/WebLocalFrameImpl.h" |
51 #include "wtf/HashSet.h" | 53 #include "wtf/HashSet.h" |
52 #include "wtf/PtrUtil.h" | 54 #include "wtf/PtrUtil.h" |
53 #include "wtf/text/WTFString.h" | 55 #include "wtf/text/WTFString.h" |
54 #include <limits.h> | |
55 #include <memory> | |
56 | 56 |
57 namespace blink { | 57 namespace blink { |
58 | 58 |
59 namespace { | 59 namespace { |
60 | 60 |
61 class HTTPRequestHeaderValidator : public WebHTTPHeaderVisitor { | 61 class HTTPRequestHeaderValidator : public WebHTTPHeaderVisitor { |
62 WTF_MAKE_NONCOPYABLE(HTTPRequestHeaderValidator); | 62 WTF_MAKE_NONCOPYABLE(HTTPRequestHeaderValidator); |
63 | 63 |
64 public: | 64 public: |
65 HTTPRequestHeaderValidator() : m_isSafe(true) {} | 65 HTTPRequestHeaderValidator() : m_isSafe(true) {} |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 // there could be a WebURLLoader instance behind the | 496 // there could be a WebURLLoader instance behind the |
497 // DocumentThreadableLoader instance. So, for safety, we chose to just | 497 // DocumentThreadableLoader instance. So, for safety, we chose to just |
498 // crash here. | 498 // crash here. |
499 CHECK(ThreadState::current()); | 499 CHECK(ThreadState::current()); |
500 | 500 |
501 m_observer->dispose(); | 501 m_observer->dispose(); |
502 m_observer = nullptr; | 502 m_observer = nullptr; |
503 } | 503 } |
504 | 504 |
505 } // namespace blink | 505 } // namespace blink |
OLD | NEW |