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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 609493002: Propagate the search request params from the browser to the Instant search base page to fix the embe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
Index: chrome/browser/ui/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index 73d08d516b0779a5144175adc05ae11f8e2e6ae3..987755d8bb8c782717420da1a49dd23b6a121f6a 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -73,6 +73,7 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition,
const base::string16& search_terms =
chrome::ExtractSearchTermsFromURL(profile(), url);
+ EmbeddedSearchRequestParams request_params(url);
if (search_terms.empty())
return false;
@@ -82,7 +83,7 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition,
if (prerenderer->CanCommitQuery(GetActiveWebContents(), search_terms)) {
// Submit query to render the prefetched results. Browser will swap the
// prerendered contents with the active tab contents.
- prerenderer->Commit(search_terms);
+ prerenderer->Commit(search_terms, request_params);
return false;
} else {
prerenderer->Cancel();
@@ -93,8 +94,7 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition,
// InstantController.
if (!chrome::IsQueryExtractionAllowedForURL(profile(), url))
return false;
-
- return instant_.SubmitQuery(search_terms);
+ return instant_.SubmitQuery(search_terms, request_params);
}
Profile* BrowserInstantController::profile() const {

Powered by Google App Engine
This is Rietveld 408576698