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

Unified Diff: content/browser/android/content_view_core_impl.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 | « chrome/browser/ui/browser_navigator.cc ('k') | content/browser/web_contents/navigation_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 96ef0bb72ccab3c2632c22a15da4cc77c074210d..22527a4a85ea2ecc3931bd7d032896fd0922a78e 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -451,10 +451,16 @@ void ContentViewCoreImpl::LoadUrlWithUserAgentOverride(
const std::string& user_agent_override) {
web_contents()->SetUserAgentOverride(user_agent_override);
bool is_overriding_user_agent(!user_agent_override.empty());
- content::Referrer referer;
- web_contents()->GetController().LoadURLWithUserAgentOverride(
- url, referer, content::PageTransitionFromInt(page_transition),
- false, std::string(), is_overriding_user_agent);
+
+ content::NavigationController::LoadURLParams load_url_params(url);
+ load_url_params.transition_type =
+ content::PageTransitionFromInt(page_transition);
+ load_url_params.override_user_agent = is_overriding_user_agent ?
+ content::NavigationController::UA_OVERRIDE_TRUE :
+ content::NavigationController::UA_OVERRIDE_FALSE;
+
+ web_contents()->GetController().LoadURLWithParams(load_url_params);
+
PostLoadUrl(url);
}
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | content/browser/web_contents/navigation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698