OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // have an *arguably* better default charset for interpreting a raw 8bit | 218 // have an *arguably* better default charset for interpreting a raw 8bit |
219 // C-D header field. It means the native OS codepage fallback in | 219 // C-D header field. It means the native OS codepage fallback in |
220 // net_util::GetSuggestedFilename is unlikely to be taken. | 220 // net_util::GetSuggestedFilename is unlikely to be taken. |
221 params->referrer_charset = default_charset; | 221 params->referrer_charset = default_charset; |
222 | 222 |
223 params->io_thread = g_browser_process->io_thread(); | 223 params->io_thread = g_browser_process->io_thread(); |
224 | 224 |
225 params->host_content_settings_map = profile->GetHostContentSettingsMap(); | 225 params->host_content_settings_map = profile->GetHostContentSettingsMap(); |
226 params->host_zoom_map = profile->GetHostZoomMap(); | 226 params->host_zoom_map = profile->GetHostZoomMap(); |
227 params->transport_security_state = profile->GetTransportSecurityState(); | 227 params->transport_security_state = profile->GetTransportSecurityState(); |
| 228 params->spdy_config_service = profile->GetSpdyConfigService(); |
228 params->ssl_config_service = profile->GetSSLConfigService(); | 229 params->ssl_config_service = profile->GetSSLConfigService(); |
229 base::Callback<Profile*(void)> profile_getter = | 230 base::Callback<Profile*(void)> profile_getter = |
230 base::Bind(&GetProfileOnUI, g_browser_process->profile_manager(), | 231 base::Bind(&GetProfileOnUI, g_browser_process->profile_manager(), |
231 profile); | 232 profile); |
232 params->cookie_monster_delegate = | 233 params->cookie_monster_delegate = |
233 new ChromeCookieMonsterDelegate(profile_getter); | 234 new ChromeCookieMonsterDelegate(profile_getter); |
234 params->database_tracker = profile->GetDatabaseTracker(); | 235 params->database_tracker = profile->GetDatabaseTracker(); |
235 params->appcache_service = profile->GetAppCacheService(); | 236 params->appcache_service = profile->GetAppCacheService(); |
236 params->blob_storage_context = profile->GetBlobStorageContext(); | 237 params->blob_storage_context = profile->GetBlobStorageContext(); |
237 params->file_system_context = profile->GetFileSystemContext(); | 238 params->file_system_context = profile->GetFileSystemContext(); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 } | 495 } |
495 | 496 |
496 void ProfileIOData::ApplyProfileParamsToContext( | 497 void ProfileIOData::ApplyProfileParamsToContext( |
497 ChromeURLRequestContext* context) const { | 498 ChromeURLRequestContext* context) const { |
498 context->set_is_incognito(profile_params_->is_incognito); | 499 context->set_is_incognito(profile_params_->is_incognito); |
499 context->set_accept_language(profile_params_->accept_language); | 500 context->set_accept_language(profile_params_->accept_language); |
500 context->set_accept_charset(profile_params_->accept_charset); | 501 context->set_accept_charset(profile_params_->accept_charset); |
501 context->set_referrer_charset(profile_params_->referrer_charset); | 502 context->set_referrer_charset(profile_params_->referrer_charset); |
502 context->set_transport_security_state( | 503 context->set_transport_security_state( |
503 profile_params_->transport_security_state); | 504 profile_params_->transport_security_state); |
| 505 context->set_spdy_config_service(profile_params_->spdy_config_service); |
504 context->set_ssl_config_service(profile_params_->ssl_config_service); | 506 context->set_ssl_config_service(profile_params_->ssl_config_service); |
505 } | 507 } |
506 | 508 |
507 void ProfileIOData::ShutdownOnUIThread() { | 509 void ProfileIOData::ShutdownOnUIThread() { |
508 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 510 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
509 enable_referrers_.Destroy(); | 511 enable_referrers_.Destroy(); |
510 clear_local_state_on_exit_.Destroy(); | 512 clear_local_state_on_exit_.Destroy(); |
511 safe_browsing_enabled_.Destroy(); | 513 safe_browsing_enabled_.Destroy(); |
512 BrowserThread::PostTask( | 514 BrowserThread::PostTask( |
513 BrowserThread::IO, FROM_HERE, | 515 BrowserThread::IO, FROM_HERE, |
514 base::Bind( | 516 base::Bind( |
515 &ResourceDispatcherHost::CancelRequestsForContext, | 517 &ResourceDispatcherHost::CancelRequestsForContext, |
516 base::Unretained(g_browser_process->resource_dispatcher_host()), | 518 base::Unretained(g_browser_process->resource_dispatcher_host()), |
517 &resource_context_)); | 519 &resource_context_)); |
518 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 520 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
519 new DeleteTask<ProfileIOData>(this)); | 521 new DeleteTask<ProfileIOData>(this)); |
520 if (!posted) | 522 if (!posted) |
521 delete this; | 523 delete this; |
522 } | 524 } |
523 | 525 |
524 void ProfileIOData::set_origin_bound_cert_service( | 526 void ProfileIOData::set_origin_bound_cert_service( |
525 net::OriginBoundCertService* origin_bound_cert_service) const { | 527 net::OriginBoundCertService* origin_bound_cert_service) const { |
526 origin_bound_cert_service_.reset(origin_bound_cert_service); | 528 origin_bound_cert_service_.reset(origin_bound_cert_service); |
527 } | 529 } |
OLD | NEW |