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

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

Issue 8199010: Fixing misleading name a in speech input setting and related variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes. Landing if no problems in the bots. Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_input_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/browser/browser_thread.h" 10 #include "content/browser/browser_thread.h"
11 11
12 ChromeSpeechInputPreferences::ChromeSpeechInputPreferences( 12 ChromeSpeechInputPreferences::ChromeSpeechInputPreferences(
13 PrefService* pref_service) 13 PrefService* pref_service)
14 : censor_results_( 14 : filter_profanities_(
15 pref_service->GetBoolean(prefs::kSpeechInputCensorResults)) { 15 pref_service->GetBoolean(prefs::kSpeechInputFilterProfanities)) {
16 } 16 }
17 17
18 ChromeSpeechInputPreferences::~ChromeSpeechInputPreferences() { 18 ChromeSpeechInputPreferences::~ChromeSpeechInputPreferences() {
19 } 19 }
20 20
21 bool ChromeSpeechInputPreferences::censor_results() const { 21 bool ChromeSpeechInputPreferences::filter_profanities() const {
22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
23 return censor_results_; 23 return filter_profanities_;
24 } 24 }
25 25
26 void ChromeSpeechInputPreferences::set_censor_results(bool censor_results) { 26 void ChromeSpeechInputPreferences::set_filter_profanities(
27 bool filter_profanities) {
27 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { 28 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
28 BrowserThread::PostTask( 29 BrowserThread::PostTask(
29 BrowserThread::IO, FROM_HERE, 30 BrowserThread::IO, FROM_HERE,
30 base::Bind(&ChromeSpeechInputPreferences::set_censor_results, 31 base::Bind(&ChromeSpeechInputPreferences::set_filter_profanities,
31 this, censor_results)); 32 this, filter_profanities));
32 return; 33 return;
33 } 34 }
34 censor_results_ = censor_results; 35 filter_profanities_ = filter_profanities;
35 } 36 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/chrome_speech_input_preferences.h ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698