OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ |
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ | 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void WhitelistLanguagePair(const std::string& original_language, | 43 void WhitelistLanguagePair(const std::string& original_language, |
44 const std::string& target_language); | 44 const std::string& target_language); |
45 void RemoveLanguagePairFromWhitelist(const std::string& original_language, | 45 void RemoveLanguagePairFromWhitelist(const std::string& original_language, |
46 const std::string& target_language); | 46 const std::string& target_language); |
47 | 47 |
48 // Will return true if at least one language has been blacklisted. | 48 // Will return true if at least one language has been blacklisted. |
49 bool HasBlacklistedLanguages() const; | 49 bool HasBlacklistedLanguages() const; |
50 void ClearBlacklistedLanguages(); | 50 void ClearBlacklistedLanguages(); |
51 | 51 |
52 // Will return true if at least one site has been blacklisted. | 52 // Will return true if at least one site has been blacklisted. |
53 bool HasBlacklistedSites(); | 53 bool HasBlacklistedSites() const; |
54 void ClearBlacklistedSites(); | 54 void ClearBlacklistedSites(); |
55 | 55 |
56 // These methods are used to track how many times the user has denied the | 56 // These methods are used to track how many times the user has denied the |
57 // translation for a specific language. (So we can present a UI to black-list | 57 // translation for a specific language. (So we can present a UI to black-list |
58 // that language if the user keeps denying translations). | 58 // that language if the user keeps denying translations). |
59 int GetTranslationDeniedCount(const std::string& language) const; | 59 int GetTranslationDeniedCount(const std::string& language) const; |
60 void IncrementTranslationDeniedCount(const std::string& language); | 60 void IncrementTranslationDeniedCount(const std::string& language); |
61 void ResetTranslationDeniedCount(const std::string& language); | 61 void ResetTranslationDeniedCount(const std::string& language); |
62 | 62 |
63 // These methods are used to track how many times the user has accepted the | 63 // These methods are used to track how many times the user has accepted the |
(...skipping 26 matching lines...) Expand all Loading... |
90 base::DictionaryValue* GetTranslationDeniedCountDictionary(); | 90 base::DictionaryValue* GetTranslationDeniedCountDictionary(); |
91 | 91 |
92 // Retrieves the dictionary mapping the number of times translation has been | 92 // Retrieves the dictionary mapping the number of times translation has been |
93 // accepted for a language, creating it if necessary. | 93 // accepted for a language, creating it if necessary. |
94 base::DictionaryValue* GetTranslationAcceptedCountDictionary() const; | 94 base::DictionaryValue* GetTranslationAcceptedCountDictionary() const; |
95 | 95 |
96 PrefService* prefs_; // Weak. | 96 PrefService* prefs_; // Weak. |
97 }; | 97 }; |
98 | 98 |
99 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ | 99 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ |
OLD | NEW |