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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 741593003: Merge: Propagate the search request params from the browser to the Instant search base page to fix … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2214
Patch Set: Created 6 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 | « no previous file | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index b5dec4f5d4bd8de5102abc67c943587b01f7a5e9..0b6cd7b219c9d2bb7de189bfe5b6c5a9f6252cef 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -38,6 +38,7 @@
#include "chrome/browser/ui/search/search_tab_helper.h"
#include "chrome/browser/ui/tab_contents/core_tab_helper.h"
#include "chrome/browser/ui/tab_helpers.h"
+#include "chrome/common/instant_types.h"
#include "chrome/common/url_constants.h"
#include "components/google/core/browser/google_url_tracker.h"
#include "components/google/core/browser/google_util.h"
@@ -536,7 +537,8 @@ TabAndroid::TabLoadStatus TabAndroid::LoadUrl(JNIEnv* env,
chrome::ExtractSearchTermsFromURL(GetProfile(), gurl);
if (!search_terms.empty() &&
prerenderer->CanCommitQuery(web_contents_.get(), search_terms)) {
- prerenderer->Commit(search_terms);
+ EmbeddedSearchRequestParams request_params(gurl);
+ prerenderer->Commit(search_terms, request_params);
if (prerenderer->UsePrerenderedPage(gurl, &params))
return FULL_PRERENDERED_PAGE_LOAD;
@@ -602,7 +604,8 @@ TabAndroid::TabLoadStatus TabAndroid::LoadUrl(JNIEnv* env,
SearchTabHelper::FromWebContents(web_contents_.get());
if (!search_terms.empty() && search_tab_helper &&
search_tab_helper->SupportsInstant()) {
- search_tab_helper->Submit(search_terms);
+ EmbeddedSearchRequestParams request_params(gurl);
+ search_tab_helper->Submit(search_terms, request_params);
return DEFAULT_PAGE_LOAD;
}
load_params.is_renderer_initiated = is_renderer_initiated;
« no previous file with comments | « no previous file | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698