| 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 "chrome/browser/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #include "extensions/browser/info_map.h" | 61 #include "extensions/browser/info_map.h" |
| 62 #include "extensions/common/constants.h" | 62 #include "extensions/common/constants.h" |
| 63 #include "net/base/keygen_handler.h" | 63 #include "net/base/keygen_handler.h" |
| 64 #include "net/cookies/canonical_cookie.h" | 64 #include "net/cookies/canonical_cookie.h" |
| 65 #include "net/http/http_transaction_factory.h" | 65 #include "net/http/http_transaction_factory.h" |
| 66 #include "net/http/http_util.h" | 66 #include "net/http/http_util.h" |
| 67 #include "net/http/transport_security_persister.h" | 67 #include "net/http/transport_security_persister.h" |
| 68 #include "net/proxy/proxy_config_service_fixed.h" | 68 #include "net/proxy/proxy_config_service_fixed.h" |
| 69 #include "net/proxy/proxy_script_fetcher_impl.h" | 69 #include "net/proxy/proxy_script_fetcher_impl.h" |
| 70 #include "net/proxy/proxy_service.h" | 70 #include "net/proxy/proxy_service.h" |
| 71 #include "net/ssl/channel_id_service.h" |
| 71 #include "net/ssl/client_cert_store.h" | 72 #include "net/ssl/client_cert_store.h" |
| 72 #include "net/ssl/server_bound_cert_service.h" | |
| 73 #include "net/url_request/data_protocol_handler.h" | 73 #include "net/url_request/data_protocol_handler.h" |
| 74 #include "net/url_request/file_protocol_handler.h" | 74 #include "net/url_request/file_protocol_handler.h" |
| 75 #include "net/url_request/ftp_protocol_handler.h" | 75 #include "net/url_request/ftp_protocol_handler.h" |
| 76 #include "net/url_request/url_request.h" | 76 #include "net/url_request/url_request.h" |
| 77 #include "net/url_request/url_request_file_job.h" | 77 #include "net/url_request/url_request_file_job.h" |
| 78 #include "net/url_request/url_request_intercepting_job_factory.h" | 78 #include "net/url_request/url_request_intercepting_job_factory.h" |
| 79 #include "net/url_request/url_request_interceptor.h" | 79 #include "net/url_request/url_request_interceptor.h" |
| 80 #include "net/url_request/url_request_job_factory_impl.h" | 80 #include "net/url_request/url_request_job_factory_impl.h" |
| 81 | 81 |
| 82 #if defined(ENABLE_CONFIGURATION_POLICY) | 82 #if defined(ENABLE_CONFIGURATION_POLICY) |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 url_blacklist_manager_->ShutdownOnUIThread(); | 1187 url_blacklist_manager_->ShutdownOnUIThread(); |
| 1188 #endif | 1188 #endif |
| 1189 if (chrome_http_user_agent_settings_) | 1189 if (chrome_http_user_agent_settings_) |
| 1190 chrome_http_user_agent_settings_->CleanupOnUIThread(); | 1190 chrome_http_user_agent_settings_->CleanupOnUIThread(); |
| 1191 incognito_availibility_pref_.Destroy(); | 1191 incognito_availibility_pref_.Destroy(); |
| 1192 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); | 1192 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); |
| 1193 if (!posted) | 1193 if (!posted) |
| 1194 delete this; | 1194 delete this; |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 void ProfileIOData::set_server_bound_cert_service( | 1197 void ProfileIOData::set_channel_id_service( |
| 1198 net::ServerBoundCertService* server_bound_cert_service) const { | 1198 net::ChannelIDService* channel_id_service) const { |
| 1199 server_bound_cert_service_.reset(server_bound_cert_service); | 1199 channel_id_service_.reset(channel_id_service); |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 void ProfileIOData::DestroyResourceContext() { | 1202 void ProfileIOData::DestroyResourceContext() { |
| 1203 resource_context_.reset(); | 1203 resource_context_.reset(); |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( | 1206 scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( |
| 1207 const ProfileParams* profile_params, | 1207 const ProfileParams* profile_params, |
| 1208 net::HttpCache::BackendFactory* main_backend) const { | 1208 net::HttpCache::BackendFactory* main_backend) const { |
| 1209 net::HttpNetworkSession::Params params; | 1209 net::HttpNetworkSession::Params params; |
| 1210 ChromeURLRequestContext* context = main_request_context(); | 1210 ChromeURLRequestContext* context = main_request_context(); |
| 1211 | 1211 |
| 1212 IOThread* const io_thread = profile_params->io_thread; | 1212 IOThread* const io_thread = profile_params->io_thread; |
| 1213 | 1213 |
| 1214 io_thread->InitializeNetworkSessionParams(¶ms); | 1214 io_thread->InitializeNetworkSessionParams(¶ms); |
| 1215 | 1215 |
| 1216 params.host_resolver = context->host_resolver(); | 1216 params.host_resolver = context->host_resolver(); |
| 1217 params.cert_verifier = context->cert_verifier(); | 1217 params.cert_verifier = context->cert_verifier(); |
| 1218 params.server_bound_cert_service = context->server_bound_cert_service(); | 1218 params.channel_id_service = context->channel_id_service(); |
| 1219 params.transport_security_state = context->transport_security_state(); | 1219 params.transport_security_state = context->transport_security_state(); |
| 1220 params.cert_transparency_verifier = context->cert_transparency_verifier(); | 1220 params.cert_transparency_verifier = context->cert_transparency_verifier(); |
| 1221 params.proxy_service = context->proxy_service(); | 1221 params.proxy_service = context->proxy_service(); |
| 1222 params.ssl_session_cache_shard = GetSSLSessionCacheShard(); | 1222 params.ssl_session_cache_shard = GetSSLSessionCacheShard(); |
| 1223 params.ssl_config_service = context->ssl_config_service(); | 1223 params.ssl_config_service = context->ssl_config_service(); |
| 1224 params.http_auth_handler_factory = context->http_auth_handler_factory(); | 1224 params.http_auth_handler_factory = context->http_auth_handler_factory(); |
| 1225 params.network_delegate = network_delegate(); | 1225 params.network_delegate = network_delegate(); |
| 1226 params.http_server_properties = context->http_server_properties(); | 1226 params.http_server_properties = context->http_server_properties(); |
| 1227 params.net_log = context->net_log(); | 1227 params.net_log = context->net_log(); |
| 1228 | 1228 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1246 void ProfileIOData::SetCookieSettingsForTesting( | 1246 void ProfileIOData::SetCookieSettingsForTesting( |
| 1247 CookieSettings* cookie_settings) { | 1247 CookieSettings* cookie_settings) { |
| 1248 DCHECK(!cookie_settings_.get()); | 1248 DCHECK(!cookie_settings_.get()); |
| 1249 cookie_settings_ = cookie_settings; | 1249 cookie_settings_ = cookie_settings; |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 void ProfileIOData::set_signin_names_for_testing( | 1252 void ProfileIOData::set_signin_names_for_testing( |
| 1253 SigninNamesOnIOThread* signin_names) { | 1253 SigninNamesOnIOThread* signin_names) { |
| 1254 signin_names_.reset(signin_names); | 1254 signin_names_.reset(signin_names); |
| 1255 } | 1255 } |
| OLD | NEW |