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

Side by Side Diff: chrome/browser/translate/translate_prefs.h

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include <vector> 9 #include <vector>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // translation for a specific language. (So we can present a UI to white-list 76 // translation for a specific language. (So we can present a UI to white-list
77 // that language if the user keeps accepting translations). 77 // that language if the user keeps accepting translations).
78 int GetTranslationAcceptedCount(const std::string& language); 78 int GetTranslationAcceptedCount(const std::string& language);
79 void IncrementTranslationAcceptedCount(const std::string& language); 79 void IncrementTranslationAcceptedCount(const std::string& language);
80 void ResetTranslationAcceptedCount(const std::string& language); 80 void ResetTranslationAcceptedCount(const std::string& language);
81 81
82 static bool CanTranslateLanguage( 82 static bool CanTranslateLanguage(
83 Profile* profile, const std::string& language); 83 Profile* profile, const std::string& language);
84 static bool ShouldAutoTranslate(PrefService* user_prefs, 84 static bool ShouldAutoTranslate(PrefService* user_prefs,
85 const std::string& original_language, std::string* target_language); 85 const std::string& original_language, std::string* target_language);
86 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); 86 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
87 static void MigrateUserPrefs(PrefService* user_prefs); 87 static void MigrateUserPrefs(PrefService* user_prefs);
88 88
89 private: 89 private:
90 friend class TranslatePrefsTest; 90 friend class TranslatePrefsTest;
91 FRIEND_TEST_ALL_PREFIXES(TranslatePrefsTest, CreateBlockedLanguages); 91 FRIEND_TEST_ALL_PREFIXES(TranslatePrefsTest, CreateBlockedLanguages);
92 92
93 // Merges two language sets to migrate to the language setting UI. 93 // Merges two language sets to migrate to the language setting UI.
94 static void CreateBlockedLanguages( 94 static void CreateBlockedLanguages(
95 std::vector<std::string>* blocked_languages, 95 std::vector<std::string>* blocked_languages,
96 const std::vector<std::string>& blacklisted_languages, 96 const std::vector<std::string>& blacklisted_languages,
(...skipping 14 matching lines...) Expand all
111 base::DictionaryValue* GetTranslationDeniedCountDictionary(); 111 base::DictionaryValue* GetTranslationDeniedCountDictionary();
112 112
113 // Retrieves the dictionary mapping the number of times translation has been 113 // Retrieves the dictionary mapping the number of times translation has been
114 // accepted for a language, creating it if necessary. 114 // accepted for a language, creating it if necessary.
115 base::DictionaryValue* GetTranslationAcceptedCountDictionary() const; 115 base::DictionaryValue* GetTranslationAcceptedCountDictionary() const;
116 116
117 PrefService* prefs_; // Weak. 117 PrefService* prefs_; // Weak.
118 }; 118 };
119 119
120 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_ 120 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_factory.cc ('k') | chrome/browser/translate/translate_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698