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

Unified Diff: chrome/browser/prerender/prerender_contents.cc

Issue 10830144: Consolidate all NavigationController::LoadURL and family functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto TOT. Created 8 years, 4 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 | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_contents.cc
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index cba5b39360c9b099f9da6b508dc64092da33e58b..fa4dda58cedf030c2936afb7c7bfd6530f232201 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -374,14 +374,16 @@ void PrerenderContents::StartPrerendering(
new_contents->SetUserAgentOverride(
prerender_manager_->config().user_agent_override);
- new_contents->GetController().LoadURLWithUserAgentOverride(
- prerender_url_,
- referrer_,
- (origin_ == ORIGIN_OMNIBOX ? content::PAGE_TRANSITION_TYPED :
- content::PAGE_TRANSITION_LINK),
- false,
- std::string(),
- prerender_manager_->config().is_overriding_user_agent);
+ content::NavigationController::LoadURLParams load_url_params(
+ prerender_url_);
+ load_url_params.referrer = referrer_;
+ load_url_params.transition_type = (origin_ == ORIGIN_OMNIBOX ?
+ content::PAGE_TRANSITION_TYPED : content::PAGE_TRANSITION_LINK);
+ load_url_params.override_user_agent =
+ prerender_manager_->config().is_overriding_user_agent ?
+ content::NavigationController::UA_OVERRIDE_TRUE :
+ content::NavigationController::UA_OVERRIDE_FALSE;
+ new_contents->GetController().LoadURLWithParams(load_url_params);
}
bool PrerenderContents::GetChildId(int* child_id) const {
« no previous file with comments | « no previous file | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698