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

Unified Diff: chrome/browser/search/search.cc

Issue 151813002: Adds InstantExtendedEnabledParam to the search request URL iff the query extraction flag is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 6 years, 10 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
Index: chrome/browser/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 1562d527433f530e9a6c3cfc56476a7ca89db780..d58c4fab5d21071ef8f013e6d0befe96f8ca66ab 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -362,6 +362,18 @@ uint64 EmbeddedSearchPageVersion() {
return kEmbeddedPageVersionDefault;
}
+std::string InstantExtendedEnabledParam(bool for_search) {
+ if (for_search && !chrome::IsQueryExtractionEnabled())
+ return std::string();
+
+ uint64 instant_extended_api_version = EmbeddedSearchPageVersion();
+ if (instant_extended_api_version) {
samarth 2014/02/07 00:25:31 Hmm I was going to say this should explicitly chec
kmadhusu 2014/02/07 00:44:05 True. Current version of EmbeddedSearchPageVersion
samarth 2014/02/07 17:50:00 espv:0 is explicitly not a supported config anymor
kmadhusu 2014/02/07 21:25:39 Removed the check.
+ return std::string(google_util::kInstantExtendedAPIParam) + "=" +
+ base::Uint64ToString(instant_extended_api_version) + "&";
+ }
+ return std::string();
+}
+
bool IsQueryExtractionEnabled() {
#if defined(OS_IOS) || defined(OS_ANDROID)
return true;

Powered by Google App Engine
This is Rietveld 408576698