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

Unified Diff: content/browser/speech/speech_recognition_request.cc

Issue 7086005: Context menu for "Voice recognition options" (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Context menu for "Voice recognition options" only appears when input-field has x-webkit-speech Created 9 years, 5 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_recognition_request.cc
diff --git a/content/browser/speech/speech_recognition_request.cc b/content/browser/speech/speech_recognition_request.cc
index 1e9b24e0a537cd877809fb5f4d768172ee8fb4ac..92b4cf10872d86b00471c51645695ba53fc7c163 100644
--- a/content/browser/speech/speech_recognition_request.cc
+++ b/content/browser/speech/speech_recognition_request.cc
@@ -19,8 +19,7 @@
namespace {
const char* const kDefaultSpeechRecognitionUrl =
- "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&"
- "pfilter=2&";
+ "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&";
const char* const kHypothesesString = "hypotheses";
const char* const kUtteranceString = "utterance";
const char* const kConfidenceString = "confidence";
@@ -123,6 +122,7 @@ SpeechRecognitionRequest::~SpeechRecognitionRequest() {}
void SpeechRecognitionRequest::Start(const std::string& language,
const std::string& grammar,
+ int profanity_filter,
const std::string& hardware_info,
const std::string& origin_url,
const std::string& content_type) {
@@ -151,6 +151,7 @@ void SpeechRecognitionRequest::Start(const std::string& language,
if (!hardware_info.empty())
parts.push_back("xhw=" + EscapeQueryParamValue(hardware_info, true));
parts.push_back("maxresults=" + base::IntToString(kMaxResults));
+ parts.push_back("pfilter=" + base::IntToString(profanity_filter));
GURL url(std::string(kDefaultSpeechRecognitionUrl) + JoinString(parts, '&'));

Powered by Google App Engine
This is Rietveld 408576698