• Home
  • Raw
  • Download

Lines Matching refs:user_prefs

24 TranslatePrefs::TranslatePrefs(PrefService* user_prefs)  in TranslatePrefs()  argument
25 : prefs_(user_prefs) { in TranslatePrefs()
139 bool TranslatePrefs::CanTranslate(PrefService* user_prefs, in CanTranslate() argument
141 TranslatePrefs prefs(user_prefs); in CanTranslate()
147 bool TranslatePrefs::ShouldAutoTranslate(PrefService* user_prefs, in ShouldAutoTranslate() argument
149 TranslatePrefs prefs(user_prefs); in ShouldAutoTranslate()
153 void TranslatePrefs::RegisterUserPrefs(PrefService* user_prefs) { in RegisterUserPrefs() argument
154 if (!user_prefs->FindPreference(kPrefTranslateLanguageBlacklist)) in RegisterUserPrefs()
155 user_prefs->RegisterListPref(kPrefTranslateLanguageBlacklist); in RegisterUserPrefs()
156 if (!user_prefs->FindPreference(kPrefTranslateSiteBlacklist)) in RegisterUserPrefs()
157 user_prefs->RegisterListPref(kPrefTranslateSiteBlacklist); in RegisterUserPrefs()
158 if (!user_prefs->FindPreference(kPrefTranslateWhitelists)) { in RegisterUserPrefs()
159 user_prefs->RegisterDictionaryPref(kPrefTranslateWhitelists); in RegisterUserPrefs()
160 MigrateTranslateWhitelists(user_prefs); in RegisterUserPrefs()
162 if (!user_prefs->FindPreference(kPrefTranslateDeniedCount)) in RegisterUserPrefs()
163 user_prefs->RegisterDictionaryPref(kPrefTranslateDeniedCount); in RegisterUserPrefs()
164 if (!user_prefs->FindPreference(kPrefTranslateAcceptedCount)) in RegisterUserPrefs()
165 user_prefs->RegisterDictionaryPref(kPrefTranslateAcceptedCount); in RegisterUserPrefs()
170 void TranslatePrefs::MigrateTranslateWhitelists(PrefService* user_prefs) { in MigrateTranslateWhitelists() argument
187 DictionaryPrefUpdate update(user_prefs, kPrefTranslateWhitelists); in MigrateTranslateWhitelists()
207 user_prefs->ScheduleSavePersistentPrefs(); in MigrateTranslateWhitelists()