| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 http_cache_enabled_(true) {} | 167 http_cache_enabled_(true) {} |
| 168 URLRequestContextBuilder::~URLRequestContextBuilder() {} | 168 URLRequestContextBuilder::~URLRequestContextBuilder() {} |
| 169 | 169 |
| 170 #if defined(OS_LINUX) | 170 #if defined(OS_LINUX) |
| 171 void URLRequestContextBuilder::set_proxy_config_service( | 171 void URLRequestContextBuilder::set_proxy_config_service( |
| 172 ProxyConfigService* proxy_config_service) { | 172 ProxyConfigService* proxy_config_service) { |
| 173 proxy_config_service_.reset(proxy_config_service); | 173 proxy_config_service_.reset(proxy_config_service); |
| 174 } | 174 } |
| 175 #endif // defined(OS_LINUX) | 175 #endif // defined(OS_LINUX) |
| 176 | 176 |
| 177 scoped_refptr<URLRequestContext> URLRequestContextBuilder::Build() { | 177 URLRequestContext* URLRequestContextBuilder::Build() { |
| 178 BasicURLRequestContext* context = new BasicURLRequestContext; | 178 BasicURLRequestContext* context = new BasicURLRequestContext; |
| 179 URLRequestContextStorage* storage = context->storage(); | 179 URLRequestContextStorage* storage = context->storage(); |
| 180 | 180 |
| 181 context->set_user_agent(user_agent_); | 181 context->set_user_agent(user_agent_); |
| 182 | 182 |
| 183 BasicNetworkDelegate* network_delegate = new BasicNetworkDelegate; | 183 BasicNetworkDelegate* network_delegate = new BasicNetworkDelegate; |
| 184 storage->set_network_delegate(network_delegate); | 184 storage->set_network_delegate(network_delegate); |
| 185 | 185 |
| 186 net::HostResolver* host_resolver = net::CreateSystemHostResolver( | 186 net::HostResolver* host_resolver = net::CreateSystemHostResolver( |
| 187 host_resolver_params_.parallelism, | 187 host_resolver_params_.parallelism, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 http_transaction_factory = new HttpNetworkLayer(network_session); | 266 http_transaction_factory = new HttpNetworkLayer(network_session); |
| 267 } | 267 } |
| 268 storage->set_http_transaction_factory(http_transaction_factory); | 268 storage->set_http_transaction_factory(http_transaction_factory); |
| 269 | 269 |
| 270 // TODO(willchan): Support sdch. | 270 // TODO(willchan): Support sdch. |
| 271 | 271 |
| 272 return context; | 272 return context; |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace net | 275 } // namespace net |
| OLD | NEW |