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

Unified Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 6128001: If speech input is disabled and we receive IPC calls, terminate the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/speech/speech_input_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/browser_render_process_host.cc
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index f09fd571ec93e5ce6ab40bae4f441909f0ce60f8..d901a77ad4240ac84bbd087d2645d4bd814e3f0b 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -65,6 +65,7 @@
#include "chrome/browser/safe_browsing/client_side_detection_service.h"
#include "chrome/browser/search_engines/search_provider_install_state_message_filter.h"
#include "chrome/browser/speech/speech_input_dispatcher_host.h"
+#include "chrome/browser/speech/speech_input_manager.h"
#include "chrome/browser/spellcheck_host.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/visitedlink/visitedlink_master.h"
@@ -788,23 +789,8 @@ void BrowserRenderProcessHost::InitExtensions() {
}
void BrowserRenderProcessHost::InitSpeechInput() {
- bool enabled = true;
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
-
- if (command_line.HasSwitch(switches::kDisableSpeechInput)) {
- enabled = false;
-#if defined(GOOGLE_CHROME_BUILD)
- } else if (!command_line.HasSwitch(switches::kEnableSpeechInput)) {
- // We need to evaluate whether IO is OK here. http://crbug.com/63335.
- base::ThreadRestrictions::ScopedAllowIO allow_io;
- // Official Chrome builds have speech input enabled by default only in the
- // dev channel.
- std::string channel = platform_util::GetVersionStringModifier();
- enabled = (channel == "dev");
-#endif
- }
-
- Send(new ViewMsg_SpeechInput_SetFeatureEnabled(enabled));
+ Send(new ViewMsg_SpeechInput_SetFeatureEnabled(
+ speech_input::SpeechInputManager::IsFeatureEnabled()));
}
void BrowserRenderProcessHost::SendUserScriptsUpdate(
« no previous file with comments | « no previous file | chrome/browser/speech/speech_input_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698