Chromium Code Reviews| Index: content/browser/speech/speech_input_preferences.cc |
| diff --git a/content/browser/speech/speech_input_preferences.cc b/content/browser/speech/speech_input_preferences.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..48460df185e01c722c72ba9bf6d9027823746ec0 |
| --- /dev/null |
| +++ b/content/browser/speech/speech_input_preferences.cc |
| @@ -0,0 +1,30 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/browser/speech/speech_input_preferences.h" |
| + |
| +#include "base/basictypes.h" |
| +#include "content/browser/browser_thread.h" |
| + |
| +SpeechInputPreferences::SpeechInputPreferences(bool censor_results) |
| + : censor_results_(censor_results){ |
|
Satish
2011/09/23 16:31:54
if we pass a pref store here, there should be a pr
allanwoj
2011/09/26 13:05:15
Uses initializer list, as discussed.
|
| +} |
| + |
| +SpeechInputPreferences::~SpeechInputPreferences() { |
| +} |
| + |
| +bool SpeechInputPreferences::censor_results() const { |
| + return censor_results_; |
|
Satish
2011/09/23 16:31:54
add a dcheck to verify that we are in the IO threa
allanwoj
2011/09/26 13:05:15
Done.
|
| +} |
| + |
| +void SpeechInputPreferences::set_censor_results(bool censor_results) { |
| + if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
| + BrowserThread::PostTask( |
| + BrowserThread::IO, FROM_HERE, |
| + NewRunnableMethod(this, &SpeechInputPreferences::set_censor_results, |
| + censor_results)); |
| + return; |
| + } |
| + censor_results_ = censor_results; |
| +} |