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

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

Issue 13865012: Change GetProfileToUse method from Profile to content::BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile & deps 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 prefs::kSpeechRecognitionFilterProfanities, 72 prefs::kSpeechRecognitionFilterProfanities,
73 kDefaultFilterProfanities, 73 kDefaultFilterProfanities,
74 PrefRegistrySyncable::UNSYNCABLE_PREF); 74 PrefRegistrySyncable::UNSYNCABLE_PREF);
75 75
76 prefs->RegisterListPref( 76 prefs->RegisterListPref(
77 prefs::kSpeechRecognitionTrayNotificationShownContexts, 77 prefs::kSpeechRecognitionTrayNotificationShownContexts,
78 PrefRegistrySyncable::UNSYNCABLE_PREF); 78 PrefRegistrySyncable::UNSYNCABLE_PREF);
79 } 79 }
80 80
81 bool ChromeSpeechRecognitionPreferences::Factory:: 81 bool ChromeSpeechRecognitionPreferences::Factory::
82 ServiceRedirectedInIncognito() const {
83 return false;
84 }
85
86 bool ChromeSpeechRecognitionPreferences::Factory::
87 ServiceIsNULLWhileTesting() const { 82 ServiceIsNULLWhileTesting() const {
88 return true; 83 return true;
89 } 84 }
90 85
91 bool ChromeSpeechRecognitionPreferences::Factory:: 86 bool ChromeSpeechRecognitionPreferences::Factory::
92 ServiceIsCreatedWithProfile() const { 87 ServiceIsCreatedWithProfile() const {
93 return false; 88 return false;
94 } 89 }
95 90
96 ChromeSpeechRecognitionPreferences::Service::Service( 91 ChromeSpeechRecognitionPreferences::Service::Service(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 prefs::kSpeechRecognitionFilterProfanities); 210 prefs::kSpeechRecognitionFilterProfanities);
216 } 211 }
217 212
218 void ChromeSpeechRecognitionPreferences::ReloadNotificationsShown() { 213 void ChromeSpeechRecognitionPreferences::ReloadNotificationsShown() {
219 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 214 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
220 base::AutoLock write_lock(preferences_lock_); 215 base::AutoLock write_lock(preferences_lock_);
221 const base::ListValue* pref_list = profile_->GetPrefs()->GetList( 216 const base::ListValue* pref_list = profile_->GetPrefs()->GetList(
222 prefs::kSpeechRecognitionTrayNotificationShownContexts); 217 prefs::kSpeechRecognitionTrayNotificationShownContexts);
223 notifications_shown_.reset(pref_list->DeepCopy()); 218 notifications_shown_.reset(pref_list->DeepCopy());
224 } 219 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698