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

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: No changes (Just trying to get commit-bot to wake up) 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..645e75de161ef313cda02199ec230c35af1d0577 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,
+ bool censor_results,
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(censor_results ? "pfilter=2" : "pfilter=0");
GURL url(std::string(kDefaultSpeechRecognitionUrl) + JoinString(parts, '&'));
« no previous file with comments | « content/browser/speech/speech_recognition_request.h ('k') | content/browser/speech/speech_recognition_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698