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

Side by Side Diff: third_party/WebKit/Source/core/loader/PingLoader.cpp

Issue 2147473002: Set 'ResourceRequest::requestorOrigin' in Blink for more request types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jochen Created 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "public/platform/WebURLRequest.h" 55 #include "public/platform/WebURLRequest.h"
56 #include "public/platform/WebURLResponse.h" 56 #include "public/platform/WebURLResponse.h"
57 #include "wtf/PtrUtil.h" 57 #include "wtf/PtrUtil.h"
58 58
59 namespace blink { 59 namespace blink {
60 60
61 static void finishPingRequestInitialization(ResourceRequest& request, LocalFrame * frame) 61 static void finishPingRequestInitialization(ResourceRequest& request, LocalFrame * frame)
62 { 62 {
63 request.setRequestContext(WebURLRequest::RequestContextPing); 63 request.setRequestContext(WebURLRequest::RequestContextPing);
64 frame->document()->fetcher()->context().addAdditionalRequestHeaders(request, FetchSubresource); 64 frame->document()->fetcher()->context().addAdditionalRequestHeaders(request, FetchSubresource);
65 frame->document()->fetcher()->context().setFirstPartyForCookies(request); 65 frame->document()->fetcher()->context().populateRequestData(request);
66 } 66 }
67 67
68 void PingLoader::loadImage(LocalFrame* frame, const KURL& url) 68 void PingLoader::loadImage(LocalFrame* frame, const KURL& url)
69 { 69 {
70 if (!frame->document()->getSecurityOrigin()->canDisplay(url)) { 70 if (!frame->document()->getSecurityOrigin()->canDisplay(url)) {
71 FrameLoader::reportLocalLoadFailed(frame, url.getString()); 71 FrameLoader::reportLocalLoadFailed(frame, url.getString());
72 return; 72 return;
73 } 73 }
74 74
75 ResourceRequest request(url); 75 ResourceRequest request(url);
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError: :cancelledError(m_url)); 220 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError: :cancelledError(m_url));
221 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError( m_url)); 221 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError( m_url));
222 } 222 }
223 223
224 DEFINE_TRACE(PingLoader) 224 DEFINE_TRACE(PingLoader)
225 { 225 {
226 LocalFrameLifecycleObserver::trace(visitor); 226 LocalFrameLifecycleObserver::trace(visitor);
227 } 227 }
228 228
229 } // namespace blink 229 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698