| Index: Source/modules/speech/SpeechRecognition.cpp
|
| diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp
|
| index 9309fe571c22f61a05c5ec9b5e46297064540470..dcba8f5099eb0b3a95221e76ca7caee7f4277b2b 100644
|
| --- a/Source/modules/speech/SpeechRecognition.cpp
|
| +++ b/Source/modules/speech/SpeechRecognition.cpp
|
| @@ -35,6 +35,7 @@
|
| #include "modules/speech/SpeechRecognitionController.h"
|
| #include "modules/speech/SpeechRecognitionError.h"
|
| #include "modules/speech/SpeechRecognitionEvent.h"
|
| +#include "platform/weborigin/KURL.h"
|
|
|
| namespace blink {
|
|
|
| @@ -58,8 +59,18 @@ void SpeechRecognition::start(ExceptionState& exceptionState)
|
| return;
|
| }
|
|
|
| + // Prepend chromium to the client param to tag requests coming from the browser.
|
| + std::size_t pos;
|
| + KURL serviceURI;
|
| + KURL kurl(ParsedURLString, m_serviceURI);
|
| + String query = kurl.query();
|
| + if (kurl.isValid() && !query.isEmpty() && ((pos = query.find("client=")) != std::string::npos)) {
|
| + query.replace(pos, 7, "client=chromium/");
|
| + serviceURI = kurl;
|
| + }
|
| +
|
| m_finalResults.clear();
|
| - m_controller->start(this, m_grammars, m_lang, m_serviceURI, m_continuous, m_interimResults, m_maxAlternatives, m_audioTrack);
|
| + m_controller->start(this, m_grammars, m_lang, serviceURI, m_continuous, m_interimResults, m_maxAlternatives, m_audioTrack);
|
| m_started = true;
|
| }
|
|
|
|
|