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

Side by Side Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 112055: Roll DEPS and fix build bustage. Propagate rename of policyBaseURL -> firstP... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 void WebFrameLoaderClient::dispatchWillSendRequest( 211 void WebFrameLoaderClient::dispatchWillSendRequest(
212 DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, 212 DocumentLoader* loader, unsigned long identifier, ResourceRequest& request,
213 const ResourceResponse& redirectResponse) { 213 const ResourceResponse& redirectResponse) {
214 214
215 if (loader) { 215 if (loader) {
216 // We want to distinguish between a request for a document to be loaded into 216 // We want to distinguish between a request for a document to be loaded into
217 // the main frame, a sub-frame, or the sub-objects in that document. 217 // the main frame, a sub-frame, or the sub-objects in that document.
218 request.setTargetType(DetermineTargetTypeFromLoader(loader)); 218 request.setTargetType(DetermineTargetTypeFromLoader(loader));
219 } 219 }
220 220
221 // Inherit the policy URL from the request's frame. However, if the request
222 // is for a main frame, the current document's policyBaseURL is the old
223 // document, so we leave policyURL empty to indicate that the request is a
224 // first-party request.
225 if (request.targetType() != ResourceRequest::TargetIsMainFrame &&
226 webframe_->frame()->document()) {
227 request.setPolicyURL(
228 webframe_->frame()->document()->firstPartyForCookies());
229 }
230
231 // FrameLoader::loadEmptyDocumentSynchronously() creates an empty document 221 // FrameLoader::loadEmptyDocumentSynchronously() creates an empty document
232 // with no URL. We don't like that, so we'll rename it to about:blank. 222 // with no URL. We don't like that, so we'll rename it to about:blank.
233 if (request.url().isEmpty()) 223 if (request.url().isEmpty())
234 request.setURL(KURL("about:blank")); 224 request.setURL(KURL("about:blank"));
235 if (request.firstPartyForCookies().isEmpty()) 225 if (request.firstPartyForCookies().isEmpty())
236 request.setFirstPartyForCookies(KURL("about:blank")); 226 request.setFirstPartyForCookies(KURL("about:blank"));
237 227
238 // Give the delegate a crack at the request. 228 // Give the delegate a crack at the request.
239 WebViewImpl* webview = webframe_->GetWebViewImpl(); 229 WebViewImpl* webview = webframe_->GetWebViewImpl();
240 WebViewDelegate* d = webview->delegate(); 230 WebViewDelegate* d = webview->delegate();
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 if (!web_view) { 1649 if (!web_view) {
1660 return NULL; 1650 return NULL;
1661 } 1651 }
1662 WebDevToolsAgentImpl* tools_agent = web_view->GetWebDevToolsAgentImpl(); 1652 WebDevToolsAgentImpl* tools_agent = web_view->GetWebDevToolsAgentImpl();
1663 if (tools_agent) { 1653 if (tools_agent) {
1664 return tools_agent->net_agent_impl(); 1654 return tools_agent->net_agent_impl();
1665 } else { 1655 } else {
1666 return NULL; 1656 return NULL;
1667 } 1657 }
1668 } 1658 }
OLDNEW
« webkit/api/public/WebURLRequest.h ('K') | « webkit/glue/resource_handle_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698