Chromium Code Reviews| Index: chrome/browser/android/contextualsearch/contextual_search_delegate.cc |
| diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc |
| index dd2c84327d5078492409dace0d43b98273bf6578..f5f0167c902eb9bb640e38f97be001aca61092f1 100644 |
| --- a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc |
| +++ b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc |
| @@ -55,6 +55,9 @@ const char kDoPreventPreloadValue[] = "1"; |
| // The number of characters that should be shown after the selected expression. |
| const int kSurroundingSizeForUI = 60; |
| +// The version of the Now on Tap API that we want to invoke; |
|
Theresa
2016/09/15 05:03:32
nit: replace the semi-colon with a period
Donn Denman
2016/09/15 21:59:59
Done.
|
| +const int kNowOnTapVersion = 1; |
| + |
| } // namespace |
| // URLFetcher ID, only used for tests: we only have one kind of fetcher. |
| @@ -207,8 +210,11 @@ std::string ContextualSearchDelegate::BuildRequestUrl(std::string selection) { |
| TemplateURLRef::SearchTermsArgs search_terms_args = |
| TemplateURLRef::SearchTermsArgs(base::string16()); |
| + int now_on_tap_version = |
| + field_trial_->IsNowOnTapBarIntegrationEnabled() ? kNowOnTapVersion : 0; |
| + |
| TemplateURLRef::SearchTermsArgs::ContextualSearchParams params( |
| - kContextualSearchRequestVersion, selected_text, "", true); |
| + kContextualSearchRequestVersion, selected_text, "", now_on_tap_version); |
| search_terms_args.contextual_search_params = params; |