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

Unified Diff: components/search_engines/template_url.cc

Issue 2520993004: Cleanup: Remove for_search param from search::InstantExtendedEnabledParam() (Closed)
Patch Set: comment Created 4 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: components/search_engines/template_url.cc
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
index eb1998a24b0cdf47f116e2c476a62fbf4ab35963..3028a5fba65c0c5e7ba62f5a1674b1721219bd44 100644
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -986,11 +986,13 @@ std::string TemplateURLRef::HandleReplacements(
case GOOGLE_INSTANT_EXTENDED_ENABLED:
DCHECK(!i->is_post_param);
+ // Regular search requests don't use Instant, so only add the param for
+ // other types.
HandleReplacement(std::string(),
- search_terms_data.InstantExtendedEnabledParam(
- type_ == SEARCH),
- *i,
- &url);
+ type_ == SEARCH
+ ? std::string()
+ : search_terms_data.InstantExtendedEnabledParam(),
+ *i, &url);
break;
case GOOGLE_CONTEXTUAL_SEARCH_VERSION:
« no previous file with comments | « components/search_engines/search_terms_data.cc ('k') | ios/chrome/browser/search_engines/ui_thread_search_terms_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698