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

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

Issue 9568002: Renamed speech input implementation from to speech_recognition_*. The namespace has been renamed fr… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased from master. Created 8 years, 9 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
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_input_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 "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 11
12 using content::BrowserThread; 12 using content::BrowserThread;
13 13
14 ChromeSpeechInputPreferences::ChromeSpeechInputPreferences( 14 ChromeSpeechRecognitionPreferences::ChromeSpeechRecognitionPreferences(
15 PrefService* pref_service) 15 PrefService* pref_service)
16 : filter_profanities_( 16 : filter_profanities_(
17 pref_service->GetBoolean(prefs::kSpeechInputFilterProfanities)) { 17 pref_service->GetBoolean(prefs::kSpeechRecognitionFilterProfanities)){
18 } 18 }
19 19
20 ChromeSpeechInputPreferences::~ChromeSpeechInputPreferences() { 20 ChromeSpeechRecognitionPreferences::~ChromeSpeechRecognitionPreferences() {
21 } 21 }
22 22
23 bool ChromeSpeechInputPreferences::FilterProfanities() const { 23 bool ChromeSpeechRecognitionPreferences::FilterProfanities() const {
24 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 24 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
25 return filter_profanities_; 25 return filter_profanities_;
26 } 26 }
27 27
28 void ChromeSpeechInputPreferences::SetFilterProfanities( 28 void ChromeSpeechRecognitionPreferences::SetFilterProfanities(
29 bool filter_profanities) { 29 bool filter_profanities) {
30 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { 30 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
31 BrowserThread::PostTask( 31 BrowserThread::PostTask(
32 BrowserThread::IO, FROM_HERE, 32 BrowserThread::IO, FROM_HERE,
33 base::Bind(&ChromeSpeechInputPreferences::SetFilterProfanities, 33 base::Bind(&ChromeSpeechRecognitionPreferences::SetFilterProfanities,
34 this, filter_profanities)); 34 this, filter_profanities));
35 return; 35 return;
36 } 36 }
37 filter_profanities_ = filter_profanities; 37 filter_profanities_ = filter_profanities;
38 } 38 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/chrome_speech_recognition_preferences.h ('k') | chrome/browser/speech/speech_input_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698