Chromium Code Reviews| 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 a7ab6f2d2fe628f82012404c2a57be9007e99ad6..42bd1bd9f0fb09c19263e8350e560aa48a452558 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/const_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::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
| net::HostResolver::kDefaultRetryAttempts, |
| @@ -141,16 +141,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::ConstHttpUserAgentSettings( |
| + "en-us,fr", "iso-8859-1,*,utf-8", user_agent)); |
|
mmenke
2012/09/26 16:28:20
nit: 4-space indent
|
| } |
| ServiceURLRequestContext::~ServiceURLRequestContext() { |