OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | |
3 * | |
4 * Redistribution and use in source and binary forms, with or without | |
5 * modification, are permitted provided that the following conditions are | |
6 * met: | |
7 * | |
8 * * Redistributions of source code must retain the above copyright | |
9 * notice, this list of conditions and the following disclaimer. | |
10 * * Redistributions in binary form must reproduce the above | |
11 * copyright notice, this list of conditions and the following disclaimer | |
12 * in the documentation and/or other materials provided with the | |
13 * distribution. | |
14 * * Neither the name of Google Inc. nor the names of its | |
15 * contributors may be used to endorse or promote products derived from | |
16 * this software without specific prior written permission. | |
17 * | |
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
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. | |
29 */ | |
30 | |
31 #include "core/fetch/FetchContext.h" | |
32 | |
33 #include "public/platform/WebCachePolicy.h" | |
34 | |
35 namespace blink { | |
36 | |
37 FetchContext& FetchContext::nullInstance() { | |
38 DEFINE_STATIC_LOCAL(FetchContext, instance, (new FetchContext)); | |
39 return instance; | |
40 } | |
41 | |
42 void FetchContext::dispatchDidChangeResourcePriority(unsigned long, | |
43 ResourceLoadPriority, | |
44 int) {} | |
45 | |
46 void FetchContext::addAdditionalRequestHeaders(ResourceRequest&, | |
47 FetchResourceType) {} | |
48 | |
49 CachePolicy FetchContext::getCachePolicy() const { | |
50 return CachePolicyVerify; | |
51 } | |
52 | |
53 WebCachePolicy FetchContext::resourceRequestCachePolicy( | |
54 ResourceRequest&, | |
55 Resource::Type, | |
56 FetchRequest::DeferOption defer) const { | |
57 return WebCachePolicy::UseProtocolCachePolicy; | |
58 } | |
59 | |
60 void FetchContext::dispatchWillSendRequest(unsigned long, | |
61 ResourceRequest&, | |
62 const ResourceResponse&, | |
63 const FetchInitiatorInfo&) {} | |
64 | |
65 void FetchContext::dispatchDidLoadResourceFromMemoryCache( | |
66 unsigned long, | |
67 Resource*, | |
68 WebURLRequest::FrameType, | |
69 WebURLRequest::RequestContext) {} | |
70 | |
71 void FetchContext::dispatchDidReceiveResponse(unsigned long, | |
72 const ResourceResponse&, | |
73 WebURLRequest::FrameType, | |
74 WebURLRequest::RequestContext, | |
75 Resource*) {} | |
76 | |
77 void FetchContext::dispatchDidReceiveData(unsigned long, | |
78 const char*, | |
79 int) {} | |
80 | |
81 void FetchContext::dispatchDidReceiveEncodedData(unsigned long, int) {} | |
82 | |
83 void FetchContext::dispatchDidDownloadData(unsigned long, int, int) {} | |
84 | |
85 void FetchContext::dispatchDidFinishLoading(unsigned long, double, int64_t) {} | |
86 | |
87 void FetchContext::dispatchDidFail(unsigned long, | |
88 const ResourceError&, | |
89 int64_t, | |
90 bool) {} | |
91 | |
92 void FetchContext::willStartLoadingResource( | |
93 unsigned long, | |
94 ResourceRequest&, | |
95 Resource::Type, | |
96 const AtomicString& fetchInitiatorName, | |
97 bool) {} | |
98 | |
99 void FetchContext::didLoadResource(Resource*) {} | |
100 | |
101 void FetchContext::addResourceTiming(const ResourceTimingInfo&) {} | |
102 | |
103 void FetchContext::sendImagePing(const KURL&) {} | |
104 | |
105 void FetchContext::addConsoleMessage(const String&, | |
106 FetchContext::LogMessageType) const {} | |
107 | |
108 void FetchContext::populateResourceRequest(Resource::Type, | |
109 const ClientHintsPreferences&, | |
110 const FetchRequest::ResourceWidth&, | |
111 ResourceRequest&) {} | |
112 | |
113 void FetchContext::setFirstPartyCookieAndRequestorOrigin(ResourceRequest&) {} | |
114 | |
115 } // namespace blink | |
OLD | NEW |