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

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 2469163002: Clean up source_site_instance usage in Navigator::RequestOpenURL. (Closed)
Patch Set: Charlie's comments Created 4 years, 1 month 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 | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 56fc3923eef3ab6f566b9fc665a863c1872671d5..3fd704f552ff0c7645131cb2cd9a18c9647c78ec 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -713,7 +713,6 @@ void NavigatorImpl::RequestOpenURL(
bool uses_post,
const scoped_refptr<ResourceRequestBodyImpl>& body,
const std::string& extra_headers,
- SiteInstance* source_site_instance,
const Referrer& referrer,
WindowOpenDisposition disposition,
bool should_replace_current_entry,
@@ -762,12 +761,17 @@ void NavigatorImpl::RequestOpenURL(
params.uses_post = uses_post;
params.post_data = body;
params.extra_headers = extra_headers;
- params.source_site_instance = source_site_instance;
if (redirect_chain.size() > 0)
params.redirect_chain = redirect_chain;
params.should_replace_current_entry = should_replace_current_entry;
params.user_gesture = user_gesture;
+ // RequestOpenURL is used only for local frames, so we can get here only if
+ // the navigation is initiated by a frame in the same SiteInstance as this
+ // frame. Note that navigations on RenderFrameProxies do not use
+ // RequestOpenURL and go through RequestTransferURL instead.
+ params.source_site_instance = current_site_instance;
+
if (render_frame_host->web_ui()) {
// Web UI pages sometimes want to override the page transition type for
// link clicks (e.g., so the new tab page can specify AUTO_BOOKMARK for
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698