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

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

Issue 2919313003: Reset counters for all language when reset translate settings (Closed)
Patch Set: sync and merge Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/browser/translate_prefs.cc
diff --git a/components/translate/core/browser/translate_prefs.cc b/components/translate/core/browser/translate_prefs.cc
index ab49ae554f1649ab83b89a2766d118399f5b0689..4ebf62e3e13a1efde6226a23a08e7db7e0726648 100644
--- a/components/translate/core/browser/translate_prefs.cc
+++ b/components/translate/core/browser/translate_prefs.cc
@@ -186,16 +186,10 @@ void TranslatePrefs::ResetToDefaults() {
ClearBlockedLanguages();
ClearBlacklistedSites();
ClearWhitelistedLanguagePairs();
+ prefs_->ClearPref(kPrefTranslateDeniedCount);
+ prefs_->ClearPref(kPrefTranslateIgnoredCount);
+ prefs_->ClearPref(kPrefTranslateAcceptedCount);
- std::vector<std::string> languages;
- GetLanguageList(&languages);
- for (std::vector<std::string>::const_iterator it = languages.begin();
- it != languages.end(); ++it) {
- const std::string& language = *it;
- ResetTranslationAcceptedCount(language);
- ResetTranslationDeniedCount(language);
- ResetTranslationIgnoredCount(language);
- }
#if defined(OS_ANDROID)
prefs_->ClearPref(kPrefTranslateAutoAlwaysCount);
prefs_->ClearPref(kPrefTranslateAutoNeverCount);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698