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

Side by Side Diff: chrome/browser/speech/chrome_speech_recognition_preferences.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/speech/chrome_speech_recognition_preferences.h" 5 #include "chrome/browser/speech/chrome_speech_recognition_preferences.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 ProfileKeyedService* 61 ProfileKeyedService*
62 ChromeSpeechRecognitionPreferences::Factory::BuildServiceInstanceFor( 62 ChromeSpeechRecognitionPreferences::Factory::BuildServiceInstanceFor(
63 content::BrowserContext* profile) const { 63 content::BrowserContext* profile) const {
64 DCHECK(profile); 64 DCHECK(profile);
65 return new ChromeSpeechRecognitionPreferences::Service( 65 return new ChromeSpeechRecognitionPreferences::Service(
66 static_cast<Profile*>(profile)); 66 static_cast<Profile*>(profile));
67 } 67 }
68 68
69 void ChromeSpeechRecognitionPreferences::Factory::RegisterUserPrefs( 69 void ChromeSpeechRecognitionPreferences::Factory::RegisterUserPrefs(
70 PrefRegistrySyncable* prefs) { 70 user_prefs::PrefRegistrySyncable* prefs) {
71 prefs->RegisterBooleanPref( 71 prefs->RegisterBooleanPref(
72 prefs::kSpeechRecognitionFilterProfanities, 72 prefs::kSpeechRecognitionFilterProfanities,
73 kDefaultFilterProfanities, 73 kDefaultFilterProfanities,
74 PrefRegistrySyncable::UNSYNCABLE_PREF); 74 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
75 75
76 prefs->RegisterListPref( 76 prefs->RegisterListPref(
77 prefs::kSpeechRecognitionTrayNotificationShownContexts, 77 prefs::kSpeechRecognitionTrayNotificationShownContexts,
78 PrefRegistrySyncable::UNSYNCABLE_PREF); 78 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
79 } 79 }
80 80
81 bool ChromeSpeechRecognitionPreferences::Factory:: 81 bool ChromeSpeechRecognitionPreferences::Factory::
82 ServiceIsNULLWhileTesting() const { 82 ServiceIsNULLWhileTesting() const {
83 return true; 83 return true;
84 } 84 }
85 85
86 bool ChromeSpeechRecognitionPreferences::Factory:: 86 bool ChromeSpeechRecognitionPreferences::Factory::
87 ServiceIsCreatedWithProfile() const { 87 ServiceIsCreatedWithProfile() const {
88 return false; 88 return false;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 prefs::kSpeechRecognitionFilterProfanities); 210 prefs::kSpeechRecognitionFilterProfanities);
211 } 211 }
212 212
213 void ChromeSpeechRecognitionPreferences::ReloadNotificationsShown() { 213 void ChromeSpeechRecognitionPreferences::ReloadNotificationsShown() {
214 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 214 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
215 base::AutoLock write_lock(preferences_lock_); 215 base::AutoLock write_lock(preferences_lock_);
216 const base::ListValue* pref_list = profile_->GetPrefs()->GetList( 216 const base::ListValue* pref_list = profile_->GetPrefs()->GetList(
217 prefs::kSpeechRecognitionTrayNotificationShownContexts); 217 prefs::kSpeechRecognitionTrayNotificationShownContexts);
218 notifications_shown_.reset(pref_list->DeepCopy()); 218 notifications_shown_.reset(pref_list->DeepCopy());
219 } 219 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/chrome_speech_recognition_preferences.h ('k') | chrome/browser/spellchecker/spellcheck_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698