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

Side by Side Diff: chrome/browser/speech/chrome_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: Separate overriden methods in profile_impl.h 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
(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 "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/browser/browser_thread.h"
11
12 ChromeSpeechInputPreferences::ChromeSpeechInputPreferences(
13 PrefService* pref_service)
14 : censor_results_(
15 pref_service->GetBoolean(prefs::kSpeechInputCensorResults)) {
16 }
17
18 ChromeSpeechInputPreferences::~ChromeSpeechInputPreferences() {
19 }
20
21 bool ChromeSpeechInputPreferences::censor_results() const {
22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
23 return censor_results_;
24 }
25
26 void ChromeSpeechInputPreferences::set_censor_results(bool censor_results) {
27 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
28 BrowserThread::PostTask(
29 BrowserThread::IO, FROM_HERE,
30 base::Bind(&ChromeSpeechInputPreferences::set_censor_results,
31 this, censor_results));
32 return;
33 }
34 censor_results_ = censor_results;
35 }
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