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

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

Issue 1018383002: Make NavigationParams clearer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 8b1cfb2b09ad6720541705cd596156a8701208cd..8025a90f6eaac0151784b76916edb93d18c9df3a 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1539,8 +1539,7 @@ bool RenderFrameHostImpl::CanCommitURL(const GURL& url) {
void RenderFrameHostImpl::Navigate(
const CommonNavigationParams& common_params,
const StartNavigationParams& start_params,
- const CommitNavigationParams& commit_params,
- const HistoryNavigationParams& history_params) {
+ const CommitNavigationParams& commit_params) {
TRACE_EVENT0("navigation", "RenderFrameHostImpl::Navigate");
// Browser plugin guests are not allowed to navigate outside web-safe schemes,
// so do not grant them the ability to request additional URLs.
@@ -1560,8 +1559,8 @@ void RenderFrameHostImpl::Navigate(
// file access. If this is a different process, we will need to grant the
// access again. The files listed in the page state are validated when they
// are received from the renderer to prevent abuse.
- if (history_params.page_state.IsValid()) {
- render_view_host_->GrantFileAccessFromPageState(history_params.page_state);
+ if (commit_params.page_state.IsValid()) {
+ render_view_host_->GrantFileAccessFromPageState(commit_params.page_state);
}
// Only send the message if we aren't suspended at the start of a cross-site
@@ -1572,15 +1571,15 @@ void RenderFrameHostImpl::Navigate(
// second navigation occurs, RenderFrameHostManager will cancel this pending
// RFH and create a new pending RFH.
DCHECK(!suspended_nav_params_.get());
- suspended_nav_params_.reset(new NavigationParams(
- common_params, start_params, commit_params, history_params));
+ suspended_nav_params_.reset(
+ new NavigationParams(common_params, start_params, commit_params));
} else {
// Get back to a clean state, in case we start a new navigation without
// completing a RFH swap or unload handler.
SetState(RenderFrameHostImpl::STATE_DEFAULT);
Send(new FrameMsg_Navigate(routing_id_, common_params, start_params,
- commit_params, history_params));
+ commit_params));
}
// Force the throbber to start. We do this because Blink's "started
@@ -1603,8 +1602,7 @@ void RenderFrameHostImpl::NavigateToURL(const GURL& url) {
url, Referrer(), ui::PAGE_TRANSITION_LINK, FrameMsg_Navigate_Type::NORMAL,
true, base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT,
GURL(), GURL());
- Navigate(common_params, StartNavigationParams(), CommitNavigationParams(),
- HistoryNavigationParams());
+ Navigate(common_params, StartNavigationParams(), CommitNavigationParams());
}
void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params,
@@ -1716,8 +1714,7 @@ void RenderFrameHostImpl::CommitNavigation(
ResourceResponse* response,
scoped_ptr<StreamHandle> body,
const CommonNavigationParams& common_params,
- const CommitNavigationParams& commit_params,
- const HistoryNavigationParams& history_params) {
+ const CommitNavigationParams& commit_params) {
DCHECK((response && body.get()) ||
!NavigationRequest::ShouldMakeNetworkRequest(common_params.url));
// TODO(clamy): Check if we have to add security checks for the browser plugin
@@ -1731,7 +1728,7 @@ void RenderFrameHostImpl::CommitNavigation(
const ResourceResponseHead head = response ?
response->head : ResourceResponseHead();
Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, common_params,
- commit_params, history_params));
+ commit_params));
// TODO(clamy): Check if we should start the throbber for non javascript urls
// here.
@@ -1951,8 +1948,7 @@ void RenderFrameHostImpl::SetNavigationsSuspended(
Send(new FrameMsg_Navigate(routing_id_,
suspended_nav_params_->common_params,
suspended_nav_params_->start_params,
- suspended_nav_params_->commit_params,
- suspended_nav_params_->history_params));
+ suspended_nav_params_->commit_params));
suspended_nav_params_.reset();
}
}

Powered by Google App Engine
This is Rietveld 408576698