| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // For the latter, we need a change on the webkit-side. | 216 // For the latter, we need a change on the webkit-side. |
| 217 // We initialize it to the default charset here and a user will | 217 // We initialize it to the default charset here and a user will |
| 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->cookie_content_settings = profile->GetCookieContentSettings(); |
| 226 params->host_zoom_map = profile->GetHostZoomMap(); | 227 params->host_zoom_map = profile->GetHostZoomMap(); |
| 227 params->transport_security_state = profile->GetTransportSecurityState(); | 228 params->transport_security_state = profile->GetTransportSecurityState(); |
| 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(); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 } | 362 } |
| 362 | 363 |
| 363 ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const { | 364 ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const { |
| 364 return extension_info_map_; | 365 return extension_info_map_; |
| 365 } | 366 } |
| 366 | 367 |
| 367 HostContentSettingsMap* ProfileIOData::GetHostContentSettingsMap() const { | 368 HostContentSettingsMap* ProfileIOData::GetHostContentSettingsMap() const { |
| 368 return host_content_settings_map_; | 369 return host_content_settings_map_; |
| 369 } | 370 } |
| 370 | 371 |
| 372 CookieContentSettings* ProfileIOData::GetCookieContentSettings() const { |
| 373 return cookie_content_settings_; |
| 374 } |
| 375 |
| 371 DesktopNotificationService* ProfileIOData::GetNotificationService() const { | 376 DesktopNotificationService* ProfileIOData::GetNotificationService() const { |
| 372 return notification_service_; | 377 return notification_service_; |
| 373 } | 378 } |
| 374 | 379 |
| 375 ProfileIOData::ResourceContext::ResourceContext(const ProfileIOData* io_data) | 380 ProfileIOData::ResourceContext::ResourceContext(const ProfileIOData* io_data) |
| 376 : io_data_(io_data) { | 381 : io_data_(io_data) { |
| 377 DCHECK(io_data); | 382 DCHECK(io_data); |
| 378 } | 383 } |
| 379 | 384 |
| 380 ProfileIOData::ResourceContext::~ResourceContext() {} | 385 ProfileIOData::ResourceContext::~ResourceContext() {} |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 #endif // defined(OS_CHROMEOS) | 468 #endif // defined(OS_CHROMEOS) |
| 464 | 469 |
| 465 // Take ownership over these parameters. | 470 // Take ownership over these parameters. |
| 466 database_tracker_ = profile_params_->database_tracker; | 471 database_tracker_ = profile_params_->database_tracker; |
| 467 appcache_service_ = profile_params_->appcache_service; | 472 appcache_service_ = profile_params_->appcache_service; |
| 468 blob_storage_context_ = profile_params_->blob_storage_context; | 473 blob_storage_context_ = profile_params_->blob_storage_context; |
| 469 file_system_context_ = profile_params_->file_system_context; | 474 file_system_context_ = profile_params_->file_system_context; |
| 470 quota_manager_ = profile_params_->quota_manager; | 475 quota_manager_ = profile_params_->quota_manager; |
| 471 host_zoom_map_ = profile_params_->host_zoom_map; | 476 host_zoom_map_ = profile_params_->host_zoom_map; |
| 472 host_content_settings_map_ = profile_params_->host_content_settings_map; | 477 host_content_settings_map_ = profile_params_->host_content_settings_map; |
| 478 cookie_content_settings_ = profile_params_->cookie_content_settings; |
| 473 notification_service_ = profile_params_->notification_service; | 479 notification_service_ = profile_params_->notification_service; |
| 474 extension_info_map_ = profile_params_->extension_info_map; | 480 extension_info_map_ = profile_params_->extension_info_map; |
| 475 prerender_manager_getter_ = profile_params_->prerender_manager_getter; | 481 prerender_manager_getter_ = profile_params_->prerender_manager_getter; |
| 476 | 482 |
| 477 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); | 483 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); |
| 478 resource_context_.set_request_context(main_request_context_); | 484 resource_context_.set_request_context(main_request_context_); |
| 479 resource_context_.set_database_tracker(database_tracker_); | 485 resource_context_.set_database_tracker(database_tracker_); |
| 480 resource_context_.set_appcache_service(appcache_service_); | 486 resource_context_.set_appcache_service(appcache_service_); |
| 481 resource_context_.set_blob_storage_context(blob_storage_context_); | 487 resource_context_.set_blob_storage_context(blob_storage_context_); |
| 482 resource_context_.set_file_system_context(file_system_context_); | 488 resource_context_.set_file_system_context(file_system_context_); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 524 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 519 new DeleteTask<ProfileIOData>(this)); | 525 new DeleteTask<ProfileIOData>(this)); |
| 520 if (!posted) | 526 if (!posted) |
| 521 delete this; | 527 delete this; |
| 522 } | 528 } |
| 523 | 529 |
| 524 void ProfileIOData::set_origin_bound_cert_service( | 530 void ProfileIOData::set_origin_bound_cert_service( |
| 525 net::OriginBoundCertService* origin_bound_cert_service) const { | 531 net::OriginBoundCertService* origin_bound_cert_service) const { |
| 526 origin_bound_cert_service_.reset(origin_bound_cert_service); | 532 origin_bound_cert_service_.reset(origin_bound_cert_service); |
| 527 } | 533 } |
| OLD | NEW |