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

Side by Side Diff: content/browser/speech/speech_input_preferences.cc

Issue 7989001: Remove use of default request context and fix use of speech censor flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update SpeechInputPreferences when preference changes Created 9 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/speech/speech_input_preferences.h"
6
7 #include "base/basictypes.h"
8 #include "content/browser/browser_thread.h"
9
10 SpeechInputPreferences::SpeechInputPreferences(bool censor_results)
11 : 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.
12 }
13
14 SpeechInputPreferences::~SpeechInputPreferences() {
15 }
16
17 bool SpeechInputPreferences::censor_results() const {
18 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.
19 }
20
21 void SpeechInputPreferences::set_censor_results(bool censor_results) {
22 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
23 BrowserThread::PostTask(
24 BrowserThread::IO, FROM_HERE,
25 NewRunnableMethod(this, &SpeechInputPreferences::set_censor_results,
26 censor_results));
27 return;
28 }
29 censor_results_ = censor_results;
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698