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

Unified Diff: components/translate/core/browser/translate_prefs.h

Issue 2090283002: add experimental param to control the triggering threshold to default Always Translate checked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test breakage Created 4 years, 6 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: components/translate/core/browser/translate_prefs.h
diff --git a/components/translate/core/browser/translate_prefs.h b/components/translate/core/browser/translate_prefs.h
index 8c803a5e743deb63c5dcb75bb4cb395ea10a24f8..4887ef78a5c687e4d2d0ed651690ba013f8461ef 100644
--- a/components/translate/core/browser/translate_prefs.h
+++ b/components/translate/core/browser/translate_prefs.h
@@ -35,6 +35,13 @@ namespace translate {
// Feature flag for "Translate UI 2016 Q2" project.
extern const base::Feature kTranslateUI2016Q2;
+// The trail (study) name in finch study config.
+extern const char kTranslateUI2016Q2TrialName[];
+
+// The name of the parameter for the number of translation trigger the "Always
+// Translate" checkbox defaul to checked.
groby-ooo-7-16 2016/06/27 23:00:34 nit:"default"
ftang 2016/06/28 05:01:46 Done.
+extern const char kNumOfTranslationTriggerAlways[];
groby-ooo-7-16 2016/06/27 23:00:34 The name is slightly unclear. Maybe kAlwaysTransla
ftang 2016/06/28 05:01:46 Done.
+
class TranslateAcceptLanguages;
// Allows updating denial times for a specific language while maintaining the
@@ -157,6 +164,10 @@ class TranslatePrefs {
const std::string& language);
bool ShouldAutoTranslate(const std::string& original_language,
std::string* target_language);
+
+ // Decide to default check the Always Transalte setting.
+ bool ShouldAlwaysTranslateBeCheckedByDefault(const std::string& language);
+
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
static void MigrateUserPrefs(PrefService* user_prefs,
const char* accept_languages_pref);

Powered by Google App Engine
This is Rietveld 408576698