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

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

Issue 1923143003: Implement the 2016Q2 Translate UI designe spec out in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor changes in comments Created 4 years, 8 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 d994bb0a459cbba9906ff08b9ce6bfd96a152494..65c3befcf10553364b948acd4048a986368b779a 100644
--- a/components/translate/core/browser/translate_prefs.h
+++ b/components/translate/core/browser/translate_prefs.h
@@ -10,6 +10,7 @@
#include <string>
#include <vector>
+#include "base/feature_list.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/time/time.h"
@@ -31,6 +32,9 @@ class PrefRegistrySyncable;
namespace translate {
+// Feature flag for "Translate UI 2016 Q2" project.
+extern const base::Feature kTranslateUI2016Q2;
+
class TranslateAcceptLanguages;
// Allows updating denial times for a specific language while maintaining the
@@ -70,6 +74,7 @@ class TranslatePrefs {
static const char kPrefTranslateSiteBlacklist[];
static const char kPrefTranslateWhitelists[];
static const char kPrefTranslateDeniedCount[];
+ static const char kPrefTranslateIgnoredCount[];
static const char kPrefTranslateAcceptedCount[];
static const char kPrefTranslateBlockedLanguages[];
static const char kPrefTranslateLastDeniedTimeForLanguage[];
@@ -124,6 +129,12 @@ class TranslatePrefs {
void IncrementTranslationDeniedCount(const std::string& language);
void ResetTranslationDeniedCount(const std::string& language);
+ // These methods are used to track how many times the user has ignored the
+ // translation bubble for a specific language.
+ int GetTranslationIgnoredCount(const std::string& language) const;
+ void IncrementTranslationIgnoredCount(const std::string& language);
+ void ResetTranslationIgnoredCount(const std::string& language);
+
// These methods are used to track how many times the user has accepted the
// translation for a specific language. (So we can present a UI to white-list
// that language if the user keeps accepting translations).

Powered by Google App Engine
This is Rietveld 408576698