Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: third_party/WebKit/Source/core/fetch/FetchContext.h

Issue 2555713002: Don't use FetchRequest in FrameFetchContext (Closed)
Patch Set: a Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 26 matching lines...) Expand all
37 #include "core/fetch/FetchRequest.h" 37 #include "core/fetch/FetchRequest.h"
38 #include "core/fetch/Resource.h" 38 #include "core/fetch/Resource.h"
39 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
40 #include "platform/network/ResourceLoadPriority.h" 40 #include "platform/network/ResourceLoadPriority.h"
41 #include "platform/network/ResourceRequest.h" 41 #include "platform/network/ResourceRequest.h"
42 #include "wtf/Forward.h" 42 #include "wtf/Forward.h"
43 #include "wtf/Noncopyable.h" 43 #include "wtf/Noncopyable.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
47 class ClientHintsPreferences;
47 class KURL; 48 class KURL;
48 class MHTMLArchive; 49 class MHTMLArchive;
49 class ResourceError; 50 class ResourceError;
50 class ResourceResponse; 51 class ResourceResponse;
51 class ResourceTimingInfo; 52 class ResourceTimingInfo;
52 class WebTaskRunner; 53 class WebTaskRunner;
53 enum class WebCachePolicy; 54 enum class WebCachePolicy;
54 55
55 enum FetchResourceType { FetchMainResource, FetchSubresource }; 56 enum FetchResourceType { FetchMainResource, FetchSubresource };
56 57
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 virtual bool defersLoading() const { return false; } 159 virtual bool defersLoading() const { return false; }
159 virtual bool isLoadComplete() const { return false; } 160 virtual bool isLoadComplete() const { return false; }
160 virtual bool pageDismissalEventBeingDispatched() const { return false; } 161 virtual bool pageDismissalEventBeingDispatched() const { return false; }
161 virtual bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) { 162 virtual bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) {
162 return false; 163 return false;
163 } 164 }
164 virtual void sendImagePing(const KURL&); 165 virtual void sendImagePing(const KURL&);
165 virtual void addConsoleMessage(const String&, 166 virtual void addConsoleMessage(const String&,
166 LogMessageType = LogErrorMessage) const; 167 LogMessageType = LogErrorMessage) const;
167 virtual SecurityOrigin* getSecurityOrigin() const { return nullptr; } 168 virtual SecurityOrigin* getSecurityOrigin() const { return nullptr; }
168 virtual void modifyRequestForCSP(ResourceRequest&); 169
169 virtual void addClientHintsIfNecessary(FetchRequest&); 170 // Populates the ResourceRequest using the given values and information
170 virtual void addCSPHeaderIfNecessary(Resource::Type, FetchRequest&); 171 // stored in the FetchContext implementation. Used by ResourceFetcher to
171 virtual void populateRequestData(ResourceRequest&); 172 // prepare a ResourceRequest instance at the start of resource loading.
173 virtual void populateResourceRequest(Resource::Type,
174 const ClientHintsPreferences&,
175 const FetchRequest::ResourceWidth&,
176 ResourceRequest&);
177 // Sets the first party for cookies and requestor origin using information
178 // stored in the FetchContext implementation.
179 virtual void setFirstPartyCookieAndRequestorOrigin(ResourceRequest&);
172 180
173 virtual MHTMLArchive* archive() const { return nullptr; } 181 virtual MHTMLArchive* archive() const { return nullptr; }
174 182
175 virtual ResourceLoadPriority modifyPriorityForExperiments( 183 virtual ResourceLoadPriority modifyPriorityForExperiments(
176 ResourceLoadPriority priority) { 184 ResourceLoadPriority priority) {
177 return priority; 185 return priority;
178 } 186 }
179 187
180 virtual WebTaskRunner* loadingTaskRunner() const { return nullptr; } 188 virtual WebTaskRunner* loadingTaskRunner() const { return nullptr; }
181 189
182 protected: 190 protected:
183 FetchContext() {} 191 FetchContext() {}
184 }; 192 };
185 193
186 } // namespace blink 194 } // namespace blink
187 195
188 #endif 196 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698