| 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 #include "chrome/service/service_process.h" | 7 #include "chrome/service/service_process.h" |
| 8 #include "net/base/cookie_monster.h" | 8 #include "net/base/cookie_monster.h" |
| 9 #include "net/base/cookie_policy.h" | 9 #include "net/base/cookie_policy.h" |
| 10 #include "net/base/host_resolver.h" | 10 #include "net/base/host_resolver.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 g_service_process->file_thread()->message_loop()); | 32 g_service_process->file_thread()->message_loop()); |
| 33 proxy_service_ = net::ProxyService::Create(proxy_config_service, false, this, | 33 proxy_service_ = net::ProxyService::Create(proxy_config_service, false, this, |
| 34 NULL, NULL, NULL); | 34 NULL, NULL, NULL); |
| 35 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); | 35 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); |
| 36 ssl_config_service_ = new net::SSLConfigServiceDefaults; | 36 ssl_config_service_ = new net::SSLConfigServiceDefaults; |
| 37 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); | 37 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); |
| 38 http_transaction_factory_ = new net::HttpCache( | 38 http_transaction_factory_ = new net::HttpCache( |
| 39 net::HttpNetworkLayer::CreateFactory(NULL, host_resolver_, | 39 net::HttpNetworkLayer::CreateFactory(NULL, host_resolver_, |
| 40 proxy_service_, | 40 proxy_service_, |
| 41 ssl_config_service_, | 41 ssl_config_service_, |
| 42 http_auth_handler_factory_), | 42 http_auth_handler_factory_, |
| 43 NULL /*net_log*/), |
| 43 net::HttpCache::DefaultBackend::InMemory(0)); | 44 net::HttpCache::DefaultBackend::InMemory(0)); |
| 44 // In-memory cookie store. | 45 // In-memory cookie store. |
| 45 cookie_store_ = new net::CookieMonster(NULL, NULL); | 46 cookie_store_ = new net::CookieMonster(NULL, NULL); |
| 46 accept_language_ = "en-us,fr"; | 47 accept_language_ = "en-us,fr"; |
| 47 accept_charset_ = "iso-8859-1,*,utf-8"; | 48 accept_charset_ = "iso-8859-1,*,utf-8"; |
| 48 } | 49 } |
| 49 | 50 |
| 50 ServiceURLRequestContext::~ServiceURLRequestContext() { | 51 ServiceURLRequestContext::~ServiceURLRequestContext() { |
| 51 delete ftp_transaction_factory_; | 52 delete ftp_transaction_factory_; |
| 52 delete http_transaction_factory_; | 53 delete http_transaction_factory_; |
| 53 delete http_auth_handler_factory_; | 54 delete http_auth_handler_factory_; |
| 54 } | 55 } |
| 55 | 56 |
| OLD | NEW |