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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/FetchContext.h

Issue 2747203002: Make prepareRequest() a separate callback of FetchContext (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
index 5097526597e22da6b76283d3cdba239f38d917fa..7dc156560ea63695d12c1deca82f5e219b1ab97c 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
@@ -90,12 +90,21 @@ class PLATFORM_EXPORT FetchContext
virtual void dispatchDidChangeResourcePriority(unsigned long identifier,
ResourceLoadPriority,
int intraPriorityValue);
+
+ // This internally dispatches WebFrameClient::willSendRequest hook
kinuko 2017/03/15 04:49:19 'and' is missing before 'hook'
Nate Chapin 2017/03/22 19:12:59 Nit: 'hooks'
kinuko 2017/03/23 05:12:17 Done.
+ // request interceptors like ServiceWorker and ApplicationCache.
+ // This may modify the request.
+ enum class RedirectType { kForRedirect, kNotForRedirect };
+ virtual void prepareRequest(ResourceRequest&, RedirectType);
+
// The last callback before a request is actually sent to the browser process.
+ // TODO(https://crbug.com/632580): make this take const ResourceRequest&.
virtual void dispatchWillSendRequest(
unsigned long identifier,
ResourceRequest&,
const ResourceResponse& redirectResponse,
const FetchInitiatorInfo& = FetchInitiatorInfo());
+
virtual void dispatchDidLoadResourceFromMemoryCache(
unsigned long identifier,
Resource*,
@@ -124,14 +133,14 @@ class PLATFORM_EXPORT FetchContext
bool isInternalRequest);
virtual bool shouldLoadNewResource(Resource::Type) const { return false; }
+
// Called when a resource load is first requested, which may not be when the
// load actually begins.
- enum class V8ActivityLoggingPolicy { SuppressLogging, Log };
- virtual void willStartLoadingResource(unsigned long identifier,
- ResourceRequest&,
- Resource::Type,
- const AtomicString& fetchInitiatorName,
- V8ActivityLoggingPolicy);
+ virtual void recordLoadingActivity(unsigned long identifier,
+ const ResourceRequest&,
+ Resource::Type,
+ const AtomicString& fetchInitiatorName);
+
virtual void didLoadResource(Resource*);
virtual void addResourceTiming(const ResourceTimingInfo&);

Powered by Google App Engine
This is Rietveld 408576698