| Index: chrome/service/net/service_url_request_context.cc
|
| diff --git a/chrome/service/net/service_url_request_context.cc b/chrome/service/net/service_url_request_context.cc
|
| index e05b7b9144ac2e68789414f44ee46b066b8cbcd2..3bb55650bf4cc45c38d0e58bc57d61df1a6b2d05 100644
|
| --- a/chrome/service/net/service_url_request_context.cc
|
| +++ b/chrome/service/net/service_url_request_context.cc
|
| @@ -25,6 +25,7 @@
|
| #include "net/http/http_server_properties_impl.h"
|
| #include "net/proxy/proxy_config_service.h"
|
| #include "net/proxy/proxy_service.h"
|
| +#include "net/url_request/static_http_user_agent_settings.h"
|
| #include "net/url_request/url_request_throttler_manager.h"
|
|
|
| namespace {
|
| @@ -108,8 +109,7 @@ std::string MakeUserAgentForServiceProcess() {
|
| ServiceURLRequestContext::ServiceURLRequestContext(
|
| const std::string& user_agent,
|
| net::ProxyConfigService* net_proxy_config_service)
|
| - : user_agent_(user_agent),
|
| - ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
|
| + : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
|
| storage_.set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
|
| storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(
|
| net_proxy_config_service, 0u, NULL));
|
| @@ -138,16 +138,8 @@ ServiceURLRequestContext::ServiceURLRequestContext(
|
| net::HttpCache::DefaultBackend::InMemory(0)));
|
| // In-memory cookie store.
|
| storage_.set_cookie_store(new net::CookieMonster(NULL, NULL));
|
| - set_accept_language("en-us,fr");
|
| - set_accept_charset("iso-8859-1,*,utf-8");
|
| -}
|
| -
|
| -const std::string& ServiceURLRequestContext::GetUserAgent(
|
| - const GURL& url) const {
|
| - // If the user agent is set explicitly return that, otherwise call the
|
| - // base class method to return default value.
|
| - return user_agent_.empty() ?
|
| - net::URLRequestContext::GetUserAgent(url) : user_agent_;
|
| + storage_.set_http_user_agent_settings(new net::StaticHttpUserAgentSettings(
|
| + "en-us,fr", "iso-8859-1,*,utf-8", user_agent));
|
| }
|
|
|
| ServiceURLRequestContext::~ServiceURLRequestContext() {
|
|
|