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

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

Issue 6308009: If user had consented for metrics reporting, send speech input request origin to the server. (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
Index: chrome/browser/speech/speech_recognition_request.cc
diff --git a/chrome/browser/speech/speech_recognition_request.cc b/chrome/browser/speech/speech_recognition_request.cc
index 1281666f3d4a9184d492a5f0bf0e9b021d77b8cb..754534aa9e5af3300720e6f10e67393289115df1 100644
--- a/chrome/browser/speech/speech_recognition_request.cc
+++ b/chrome/browser/speech/speech_recognition_request.cc
@@ -123,6 +123,7 @@ SpeechRecognitionRequest::~SpeechRecognitionRequest() {}
bool SpeechRecognitionRequest::Send(const std::string& language,
const std::string& grammar,
const std::string& hardware_info,
+ const std::string& origin_url,
const std::string& content_type,
const std::string& audio_data) {
DCHECK(!url_fetcher_.get());
@@ -161,6 +162,7 @@ bool SpeechRecognitionRequest::Send(const std::string& language,
this));
url_fetcher_->set_upload_data(content_type, audio_data);
url_fetcher_->set_request_context(url_context_);
+ url_fetcher_->set_referrer(origin_url);
// The speech recognition API does not require user identification as part
// of requests, so we don't send cookies or auth data for these requests to
« no previous file with comments | « chrome/browser/speech/speech_recognition_request.h ('k') | chrome/browser/speech/speech_recognition_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698