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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/speech/chrome_speech_input_preferences.cc
diff --git a/chrome/browser/speech/chrome_speech_input_preferences.cc b/chrome/browser/speech/chrome_speech_input_preferences.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e6a298271e758e10f9cbf75244633245d492d0ef
--- /dev/null
+++ b/chrome/browser/speech/chrome_speech_input_preferences.cc
@@ -0,0 +1,35 @@
+// 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 "chrome/browser/speech/chrome_speech_input_preferences.h"
+
+#include "base/bind.h"
+#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/common/pref_names.h"
+#include "content/browser/browser_thread.h"
+
+ChromeSpeechInputPreferences::ChromeSpeechInputPreferences(
+ PrefService* pref_service)
+ : censor_results_(
+ pref_service->GetBoolean(prefs::kSpeechInputCensorResults)) {
+}
+
+ChromeSpeechInputPreferences::~ChromeSpeechInputPreferences() {
+}
+
+bool ChromeSpeechInputPreferences::censor_results() const {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ return censor_results_;
+}
+
+void ChromeSpeechInputPreferences::set_censor_results(bool censor_results) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(&ChromeSpeechInputPreferences::set_censor_results,
+ this, censor_results));
+ return;
+ }
+ censor_results_ = censor_results;
+}
« 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