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

Unified Diff: chrome/browser/speech/tts_linux.cc

Issue 209393004: Only enable speech dispatcher on Linux with an explicit switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation and comments Created 6 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/speech/tts_linux.cc
diff --git a/chrome/browser/speech/tts_linux.cc b/chrome/browser/speech/tts_linux.cc
index 4d43a8e3e7dc85d1ea38d4e8d6319eb797e889c0..44946ffe6ee43e2ee9b8f1b3ff7b195fd3cf578d 100644
--- a/chrome/browser/speech/tts_linux.cc
+++ b/chrome/browser/speech/tts_linux.cc
@@ -6,11 +6,13 @@
#include <map>
+#include "base/command_line.h"
#include "base/debug/leak_annotations.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/speech/tts_platform.h"
+#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h"
#include "library_loaders/libspeechd.h"
@@ -93,6 +95,10 @@ SPDNotificationType TtsPlatformImplLinux::current_notification_ =
TtsPlatformImplLinux::TtsPlatformImplLinux()
: utterance_id_(0) {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (!command_line.HasSwitch(switches::kEnableSpeechDispatcher))
+ return;
+
BrowserThread::PostTask(BrowserThread::FILE,
FROM_HERE,
base::Bind(&TtsPlatformImplLinux::Initialize,
« no previous file with comments | « no previous file | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698