OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/service/net/service_url_request_context.h" | 5 #include "chrome/service/net/service_url_request_context.h" |
6 | 6 |
7 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
8 #include <sys/utsname.h> | 8 #include <sys/utsname.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 http_transaction_factory_ = new net::HttpCache( | 125 http_transaction_factory_ = new net::HttpCache( |
126 net::HttpNetworkLayer::CreateFactory(host_resolver_, | 126 net::HttpNetworkLayer::CreateFactory(host_resolver_, |
127 dnsrr_resolver_, | 127 dnsrr_resolver_, |
128 NULL /* dns_cert_checker */, | 128 NULL /* dns_cert_checker */, |
129 NULL /* ssl_host_info_factory */, | 129 NULL /* ssl_host_info_factory */, |
130 proxy_service_, | 130 proxy_service_, |
131 ssl_config_service_, | 131 ssl_config_service_, |
132 http_auth_handler_factory_, | 132 http_auth_handler_factory_, |
133 NULL /* network_delegate */, | 133 NULL /* network_delegate */, |
134 NULL /* net_log */), | 134 NULL /* net_log */), |
| 135 NULL /* net_log */, |
135 net::HttpCache::DefaultBackend::InMemory(0)); | 136 net::HttpCache::DefaultBackend::InMemory(0)); |
136 // In-memory cookie store. | 137 // In-memory cookie store. |
137 cookie_store_ = new net::CookieMonster(NULL, NULL); | 138 cookie_store_ = new net::CookieMonster(NULL, NULL); |
138 accept_language_ = "en-us,fr"; | 139 accept_language_ = "en-us,fr"; |
139 accept_charset_ = "iso-8859-1,*,utf-8"; | 140 accept_charset_ = "iso-8859-1,*,utf-8"; |
140 } | 141 } |
141 | 142 |
142 const std::string& ServiceURLRequestContext::GetUserAgent( | 143 const std::string& ServiceURLRequestContext::GetUserAgent( |
143 const GURL& url) const { | 144 const GURL& url) const { |
144 // If the user agent is set explicitly return that, otherwise call the | 145 // If the user agent is set explicitly return that, otherwise call the |
(...skipping 22 matching lines...) Expand all Loading... |
167 url_request_context_ = new ServiceURLRequestContext(user_agent_); | 168 url_request_context_ = new ServiceURLRequestContext(user_agent_); |
168 return url_request_context_; | 169 return url_request_context_; |
169 } | 170 } |
170 | 171 |
171 scoped_refptr<base::MessageLoopProxy> | 172 scoped_refptr<base::MessageLoopProxy> |
172 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { | 173 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { |
173 return io_message_loop_proxy_; | 174 return io_message_loop_proxy_; |
174 } | 175 } |
175 | 176 |
176 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} | 177 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} |
OLD | NEW |