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

Unified 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 side-by-side diff with in-line comments
Download patch
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;
+}

Powered by Google App Engine
This is Rietveld 408576698