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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 403323003: Remove 'WebURLRequest::TargetType' from 'content::RenderFrameImpl'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index c7d721dbee6d9e60d95a36bfbf80344d5a6d3fd6..1d209707d98fbb77ed9743e4335a3554459d6beb 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2380,7 +2380,7 @@ void RenderFrameImpl::willSendRequest(
// Set the first party for cookies url if it has not been set yet (new
// requests). For redirects, it is updated by WebURLLoaderImpl.
if (request.firstPartyForCookies().isEmpty()) {
- if (request.targetType() == blink::WebURLRequest::TargetIsMainFrame) {
+ if (request.frameType() == blink::WebURLRequest::FrameTypeTopLevel) {
request.setFirstPartyForCookies(request.url());
} else {
request.setFirstPartyForCookies(
@@ -2441,8 +2441,8 @@ void RenderFrameImpl::willSendRequest(
// Add the default accept header for frame request if it has not been set
// already.
- if ((request.targetType() == blink::WebURLRequest::TargetIsMainFrame ||
- request.targetType() == blink::WebURLRequest::TargetIsSubframe) &&
+ if ((request.frameType() == blink::WebURLRequest::FrameTypeTopLevel ||
+ request.frameType() == blink::WebURLRequest::FrameTypeNested) &&
request.httpHeaderField(WebString::fromUTF8(kAcceptHeader)).isEmpty()) {
request.setHTTPHeaderField(WebString::fromUTF8(kAcceptHeader),
WebString::fromUTF8(kDefaultAcceptHeader));
@@ -2469,8 +2469,8 @@ void RenderFrameImpl::willSendRequest(
}
int provider_id = kInvalidServiceWorkerProviderId;
- if (request.targetType() == blink::WebURLRequest::TargetIsMainFrame ||
- request.targetType() == blink::WebURLRequest::TargetIsSubframe) {
+ if (request.frameType() == blink::WebURLRequest::FrameTypeTopLevel ||
+ request.frameType() == blink::WebURLRequest::FrameTypeNested) {
// |provisionalDataSource| may be null in some content::ResourceFetcher
// use cases, we don't hook those requests.
if (frame->provisionalDataSource()) {
@@ -2513,7 +2513,7 @@ void RenderFrameImpl::willSendRequest(
if (top_document_state) {
// TODO(gavinp): separate out prefetching and prerender field trials
// if the rel=prerender rel type is sticking around.
- if (request.targetType() == WebURLRequest::TargetIsPrefetch)
+ if (request.requestContext() == WebURLRequest::RequestContextPrefetch)
top_document_state->set_was_prefetcher(true);
if (was_after_preconnect_request)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698