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

Unified Diff: third_party/WebKit/Source/core/loader/PingLoader.cpp

Issue 2747203002: Make prepareRequest() a separate callback of FetchContext (Closed)
Patch Set: addressed comments 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/core/loader/PingLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/PingLoader.cpp b/third_party/WebKit/Source/core/loader/PingLoader.cpp
index 2221d291c077636a125dead3b242ede7a8ff29e5..fa733126c2e6906bda7f77904539d4f836d55821 100644
--- a/third_party/WebKit/Source/core/loader/PingLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/PingLoader.cpp
@@ -253,9 +253,10 @@ PingLoaderImpl::PingLoaderImpl(LocalFrame* frame,
FetchContext& fetchContext = frame->document()->fetcher()->context();
- fetchContext.willStartLoadingResource(
- m_identifier, request, Resource::Image, initiator,
- FetchContext::V8ActivityLoggingPolicy::Log);
+ fetchContext.prepareRequest(request,
+ FetchContext::RedirectType::kNotForRedirect);
+ fetchContext.recordLoadingActivity(m_identifier, request, Resource::Image,
+ initiator);
FetchInitiatorInfo initiatorInfo;
initiatorInfo.name = initiator;
@@ -332,6 +333,8 @@ bool PingLoaderImpl::willFollowRedirect(
FetchInitiatorInfo initiatorInfo;
initiatorInfo.name = m_initiator;
FetchContext& fetchContext = frame()->document()->fetcher()->context();
+ fetchContext.prepareRequest(passedNewRequest.toMutableResourceRequest(),
+ FetchContext::RedirectType::kForRedirect);
fetchContext.dispatchWillSendRequest(
m_identifier, passedNewRequest.toMutableResourceRequest(),
passedRedirectResponse.toResourceResponse(), initiatorInfo);

Powered by Google App Engine
This is Rietveld 408576698