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 <map> | |
8 #include <string> | 9 #include <string> |
10 #include <vector> | |
Takashi Toyoshima
2013/04/12 08:43:35
why?
hajimehoshi
2013/04/12 09:28:52
I don't remember... I'll remove them.
On 2013/04/
| |
9 | 11 |
10 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
11 | 13 |
12 class PrefRegistrySyncable; | 14 class PrefRegistrySyncable; |
13 class PrefService; | 15 class PrefService; |
14 | 16 |
15 namespace base { | 17 namespace base { |
16 class DictionaryValue; | 18 class DictionaryValue; |
17 class ListValue; | 19 class ListValue; |
18 } | 20 } |
(...skipping 24 matching lines...) Expand all Loading... | |
43 void WhitelistLanguagePair(const std::string& original_language, | 45 void WhitelistLanguagePair(const std::string& original_language, |
44 const std::string& target_language); | 46 const std::string& target_language); |
45 void RemoveLanguagePairFromWhitelist(const std::string& original_language, | 47 void RemoveLanguagePairFromWhitelist(const std::string& original_language, |
46 const std::string& target_language); | 48 const std::string& target_language); |
47 | 49 |
48 // Will return true if at least one language has been blacklisted. | 50 // Will return true if at least one language has been blacklisted. |
49 bool HasBlacklistedLanguages() const; | 51 bool HasBlacklistedLanguages() const; |
50 void ClearBlacklistedLanguages(); | 52 void ClearBlacklistedLanguages(); |
51 | 53 |
52 // Will return true if at least one site has been blacklisted. | 54 // Will return true if at least one site has been blacklisted. |
53 bool HasBlacklistedSites(); | 55 bool HasBlacklistedSites() const; |
54 void ClearBlacklistedSites(); | 56 void ClearBlacklistedSites(); |
55 | 57 |
56 // These methods are used to track how many times the user has denied the | 58 // 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 | 59 // translation for a specific language. (So we can present a UI to black-list |
58 // that language if the user keeps denying translations). | 60 // that language if the user keeps denying translations). |
59 int GetTranslationDeniedCount(const std::string& language) const; | 61 int GetTranslationDeniedCount(const std::string& language) const; |
60 void IncrementTranslationDeniedCount(const std::string& language); | 62 void IncrementTranslationDeniedCount(const std::string& language); |
61 void ResetTranslationDeniedCount(const std::string& language); | 63 void ResetTranslationDeniedCount(const std::string& language); |
62 | 64 |
63 // These methods are used to track how many times the user has accepted the | 65 // 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(); | 92 base::DictionaryValue* GetTranslationDeniedCountDictionary(); |
91 | 93 |
92 // Retrieves the dictionary mapping the number of times translation has been | 94 // Retrieves the dictionary mapping the number of times translation has been |
93 // accepted for a language, creating it if necessary. | 95 // accepted for a language, creating it if necessary. |
94 base::DictionaryValue* GetTranslationAcceptedCountDictionary() const; | 96 base::DictionaryValue* GetTranslationAcceptedCountDictionary() const; |
95 | 97 |
96 PrefService* prefs_; // Weak. | 98 PrefService* prefs_; // Weak. |
97 }; | 99 }; |
98 | 100 |
99 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ | 101 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ |
OLD | NEW |