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

Unified Diff: chrome/browser/ui/browser_instant_controller.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 | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/ui/search/instant_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c579176157be92fd3cc0490a7f7c3ef1aeb52f6f 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/ui/search/search_model.h"
#include "chrome/browser/ui/search/search_tab_helper.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/common/instant_types.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/user_metrics.h"
@@ -73,6 +74,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 +84,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 +95,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 {
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/ui/search/instant_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698