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

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

Issue 10918279: Provide mutable members of UrlRequestContext via pure-virtual interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address mmenke's comments Created 8 years, 2 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/google_streaming_remote_engine.cc
diff --git a/content/browser/speech/google_streaming_remote_engine.cc b/content/browser/speech/google_streaming_remote_engine.cc
index 66bd9e664692f109887f8914dbab496d2f39724f..a50cca68478f96cf3bf85c9affc6b448ef163d5b 100644
--- a/content/browser/speech/google_streaming_remote_engine.cc
+++ b/content/browser/speech/google_streaming_remote_engine.cc
@@ -567,7 +567,10 @@ std::string GoogleStreamingRemoteEngine::GetAcceptedLanguages() const {
net::URLRequestContext* request_context =
url_context_->GetURLRequestContext();
DCHECK(request_context);
- std::string accepted_language_list = request_context->accept_language();
+ // TODO(pauljensen): GoogleStreamingRemoteEngine should be constructed with
+ // a reference to the HttpUserAgentSettings rather than accessing the
+ // accept language through the URLRequestContext.
+ std::string accepted_language_list = request_context->GetAcceptLanguage();
size_t separator = accepted_language_list.find_first_of(",;");
if (separator != std::string::npos)
langs = accepted_language_list.substr(0, separator);

Powered by Google App Engine
This is Rietveld 408576698