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

Unified Diff: chrome/browser/android/contextualsearch/contextual_search_field_trial.cc

Issue 2697513005: [TTS] Add server control from a field_trial param. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/android/contextualsearch/contextual_search_field_trial.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/contextualsearch/contextual_search_field_trial.cc
diff --git a/chrome/browser/android/contextualsearch/contextual_search_field_trial.cc b/chrome/browser/android/contextualsearch/contextual_search_field_trial.cc
index d139053cd68db4a93a6f077e254a7cbe181ff289..8e8310f2df1039206275a9215a5efe18599b9ef6 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_field_trial.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_field_trial.cc
@@ -21,6 +21,8 @@ const char kContextualSearchIcingSurroundingSizeParamName[] =
const char kContextualSearchSendURLDisabledParamName[] = "disable_send_url";
const char kContextualSearchDecodeMentionsDisabledParamName[] =
"disable_decode_mentions";
+const char kContextualCardsVersionParamName[] = "contextual_cards_version";
+
// The default size of the content surrounding the selection to gather, allowing
// room for other parameters.
const int kContextualSearchDefaultContentSize = 1536;
@@ -43,7 +45,9 @@ ContextualSearchFieldTrial::ContextualSearchFieldTrial()
is_decode_mentions_disabled_cached_(false),
is_decode_mentions_disabled_(false),
is_contextual_cards_bar_integration_enabled_cached_(false),
- is_contextual_cards_bar_integration_enabled_(false) {}
+ is_contextual_cards_bar_integration_enabled_(false),
+ is_contextual_cards_version_cached_(false),
+ contextual_cards_version_(0) {}
ContextualSearchFieldTrial::~ContextualSearchFieldTrial() {}
@@ -90,6 +94,12 @@ bool ContextualSearchFieldTrial::IsContextualCardsBarIntegrationEnabled() {
&is_contextual_cards_bar_integration_enabled_);
}
+int ContextualSearchFieldTrial::GetContextualCardsVersion() {
+ return GetIntParamValueOrDefault(kContextualCardsVersionParamName, 0,
+ &is_contextual_cards_version_cached_,
+ &contextual_cards_version_);
+}
+
bool ContextualSearchFieldTrial::GetBooleanParam(const std::string& name,
bool* is_value_cached,
bool* cached_value) {
« no previous file with comments | « chrome/browser/android/contextualsearch/contextual_search_field_trial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698