| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/url_request/url_request_context_builder.h" | 5 #include "net/url_request/url_request_context_builder.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 http_cache_enabled_(true) {} | 172 http_cache_enabled_(true) {} |
| 173 URLRequestContextBuilder::~URLRequestContextBuilder() {} | 173 URLRequestContextBuilder::~URLRequestContextBuilder() {} |
| 174 | 174 |
| 175 #if defined(OS_LINUX) | 175 #if defined(OS_LINUX) |
| 176 void URLRequestContextBuilder::set_proxy_config_service( | 176 void URLRequestContextBuilder::set_proxy_config_service( |
| 177 ProxyConfigService* proxy_config_service) { | 177 ProxyConfigService* proxy_config_service) { |
| 178 proxy_config_service_.reset(proxy_config_service); | 178 proxy_config_service_.reset(proxy_config_service); |
| 179 } | 179 } |
| 180 #endif // defined(OS_LINUX) | 180 #endif // defined(OS_LINUX) |
| 181 | 181 |
| 182 scoped_refptr<URLRequestContext> URLRequestContextBuilder::Build() { | 182 URLRequestContext* URLRequestContextBuilder::Build() { |
| 183 BasicURLRequestContext* context = new BasicURLRequestContext; | 183 BasicURLRequestContext* context = new BasicURLRequestContext; |
| 184 URLRequestContextStorage* storage = context->storage(); | 184 URLRequestContextStorage* storage = context->storage(); |
| 185 | 185 |
| 186 context->set_user_agent(user_agent_); | 186 context->set_user_agent(user_agent_); |
| 187 | 187 |
| 188 BasicNetworkDelegate* network_delegate = new BasicNetworkDelegate; | 188 BasicNetworkDelegate* network_delegate = new BasicNetworkDelegate; |
| 189 storage->set_network_delegate(network_delegate); | 189 storage->set_network_delegate(network_delegate); |
| 190 | 190 |
| 191 net::HostResolver* host_resolver = net::CreateSystemHostResolver( | 191 net::HostResolver* host_resolver = net::CreateSystemHostResolver( |
| 192 host_resolver_params_.parallelism, | 192 host_resolver_params_.parallelism, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 http_transaction_factory = new HttpNetworkLayer(network_session); | 271 http_transaction_factory = new HttpNetworkLayer(network_session); |
| 272 } | 272 } |
| 273 storage->set_http_transaction_factory(http_transaction_factory); | 273 storage->set_http_transaction_factory(http_transaction_factory); |
| 274 | 274 |
| 275 // TODO(willchan): Support sdch. | 275 // TODO(willchan): Support sdch. |
| 276 | 276 |
| 277 return context; | 277 return context; |
| 278 } | 278 } |
| 279 | 279 |
| 280 } // namespace net | 280 } // namespace net |
| OLD | NEW |