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

Side by Side Diff: chrome/browser/speech/chrome_speech_input_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/speech/chrome_speech_input_preferences.h"
6
7 #include "base/bind.h"
8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/common/pref_names.h"
10 #include "content/public/browser/browser_thread.h"
11
12 using content::BrowserThread;
13
14 ChromeSpeechInputPreferences::ChromeSpeechInputPreferences(
15 PrefService* pref_service)
16 : filter_profanities_(
17 pref_service->GetBoolean(prefs::kSpeechInputFilterProfanities)) {
18 }
19
20 ChromeSpeechInputPreferences::~ChromeSpeechInputPreferences() {
21 }
22
23 bool ChromeSpeechInputPreferences::FilterProfanities() const {
24 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
25 return filter_profanities_;
26 }
27
28 void ChromeSpeechInputPreferences::SetFilterProfanities(
29 bool filter_profanities) {
30 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
31 BrowserThread::PostTask(
32 BrowserThread::IO, FROM_HERE,
33 base::Bind(&ChromeSpeechInputPreferences::SetFilterProfanities,
34 this, filter_profanities));
35 return;
36 }
37 filter_profanities_ = filter_profanities;
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698