| 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 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/extensions/extension_protocols.h" | 21 #include "chrome/browser/extensions/extension_protocols.h" |
| 22 #include "chrome/browser/io_thread.h" | 22 #include "chrome/browser/io_thread.h" |
| 23 #include "chrome/browser/media/media_internals.h" | 23 #include "chrome/browser/media/media_internals.h" |
| 24 #include "chrome/browser/net/chrome_cookie_notification_details.h" | 24 #include "chrome/browser/net/chrome_cookie_notification_details.h" |
| 25 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 25 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" |
| 26 #include "chrome/browser/net/chrome_net_log.h" | 26 #include "chrome/browser/net/chrome_net_log.h" |
| 27 #include "chrome/browser/net/chrome_network_delegate.h" | 27 #include "chrome/browser/net/chrome_network_delegate.h" |
| 28 #include "chrome/browser/net/pref_proxy_config_service.h" | 28 #include "chrome/browser/net/pref_proxy_config_service.h" |
| 29 #include "chrome/browser/net/proxy_service_factory.h" | 29 #include "chrome/browser/net/proxy_service_factory.h" |
| 30 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 30 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 31 #include "chrome/browser/policy/host_blacklist_manager.h" |
| 31 #include "chrome/browser/prefs/pref_service.h" | 32 #include "chrome/browser/prefs/pref_service.h" |
| 32 #include "chrome/browser/prerender/prerender_manager.h" | 33 #include "chrome/browser/prerender/prerender_manager.h" |
| 33 #include "chrome/browser/profiles/profile.h" | 34 #include "chrome/browser/profiles/profile.h" |
| 34 #include "chrome/browser/profiles/profile_manager.h" | 35 #include "chrome/browser/profiles/profile_manager.h" |
| 35 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 36 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 36 #include "chrome/common/chrome_notification_types.h" | 37 #include "chrome/common/chrome_notification_types.h" |
| 37 #include "chrome/common/chrome_switches.h" | 38 #include "chrome/common/chrome_switches.h" |
| 38 #include "chrome/common/pref_names.h" | 39 #include "chrome/common/pref_names.h" |
| 39 #include "chrome/common/url_constants.h" | 40 #include "chrome/common/url_constants.h" |
| 40 #include "content/browser/appcache/chrome_appcache_service.h" | 41 #include "content/browser/appcache/chrome_appcache_service.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(); |
| 238 params->quota_manager = profile->GetQuotaManager(); | 239 params->quota_manager = profile->GetQuotaManager(); |
| 240 params->host_blacklist_manager = profile->GetHostBlacklistManager(); |
| 239 params->extension_info_map = profile->GetExtensionInfoMap(); | 241 params->extension_info_map = profile->GetExtensionInfoMap(); |
| 240 params->notification_service = | 242 params->notification_service = |
| 241 DesktopNotificationServiceFactory::GetForProfile(profile); | 243 DesktopNotificationServiceFactory::GetForProfile(profile); |
| 242 params->prerender_manager_getter = | 244 params->prerender_manager_getter = |
| 243 base::Bind(&GetPrerenderManagerOnUI, profile_getter); | 245 base::Bind(&GetPrerenderManagerOnUI, profile_getter); |
| 244 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); | 246 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); |
| 245 | 247 |
| 246 params->proxy_config_service.reset( | 248 params->proxy_config_service.reset( |
| 247 ProxyServiceFactory::CreateProxyConfigService( | 249 ProxyServiceFactory::CreateProxyConfigService( |
| 248 profile->GetProxyConfigTracker())); | 250 profile->GetProxyConfigTracker())); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 main_request_context_ = new ChromeURLRequestContext; | 399 main_request_context_ = new ChromeURLRequestContext; |
| 398 extensions_request_context_ = new ChromeURLRequestContext; | 400 extensions_request_context_ = new ChromeURLRequestContext; |
| 399 | 401 |
| 400 profile_params_->appcache_service->set_request_context(main_request_context_); | 402 profile_params_->appcache_service->set_request_context(main_request_context_); |
| 401 | 403 |
| 402 chrome_url_data_manager_backend_.reset(new ChromeURLDataManagerBackend); | 404 chrome_url_data_manager_backend_.reset(new ChromeURLDataManagerBackend); |
| 403 | 405 |
| 404 network_delegate_.reset(new ChromeNetworkDelegate( | 406 network_delegate_.reset(new ChromeNetworkDelegate( |
| 405 io_thread_globals->extension_event_router_forwarder.get(), | 407 io_thread_globals->extension_event_router_forwarder.get(), |
| 406 profile_params_->extension_info_map, | 408 profile_params_->extension_info_map, |
| 409 profile_params_->host_blacklist_manager.get(), |
| 407 profile_params_->profile, | 410 profile_params_->profile, |
| 408 &enable_referrers_)); | 411 &enable_referrers_)); |
| 409 | 412 |
| 410 dns_cert_checker_.reset( | 413 dns_cert_checker_.reset( |
| 411 CreateDnsCertProvenanceChecker(io_thread_globals->dnsrr_resolver.get(), | 414 CreateDnsCertProvenanceChecker(io_thread_globals->dnsrr_resolver.get(), |
| 412 main_request_context_)); | 415 main_request_context_)); |
| 413 | 416 |
| 414 proxy_service_.reset( | 417 proxy_service_.reset( |
| 415 ProxyServiceFactory::CreateProxyService( | 418 ProxyServiceFactory::CreateProxyService( |
| 416 io_thread->net_log(), | 419 io_thread->net_log(), |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 if (parsed_command_line.HasSwitch(switches::kEnableGView)) | 464 if (parsed_command_line.HasSwitch(switches::kEnableGView)) |
| 462 job_factory_->AddInterceptor(new chromeos::GViewRequestInterceptor); | 465 job_factory_->AddInterceptor(new chromeos::GViewRequestInterceptor); |
| 463 #endif // defined(OS_CHROMEOS) | 466 #endif // defined(OS_CHROMEOS) |
| 464 | 467 |
| 465 // Take ownership over these parameters. | 468 // Take ownership over these parameters. |
| 466 database_tracker_ = profile_params_->database_tracker; | 469 database_tracker_ = profile_params_->database_tracker; |
| 467 appcache_service_ = profile_params_->appcache_service; | 470 appcache_service_ = profile_params_->appcache_service; |
| 468 blob_storage_context_ = profile_params_->blob_storage_context; | 471 blob_storage_context_ = profile_params_->blob_storage_context; |
| 469 file_system_context_ = profile_params_->file_system_context; | 472 file_system_context_ = profile_params_->file_system_context; |
| 470 quota_manager_ = profile_params_->quota_manager; | 473 quota_manager_ = profile_params_->quota_manager; |
| 474 host_blacklist_manager_ = profile_params_->host_blacklist_manager; |
| 471 host_zoom_map_ = profile_params_->host_zoom_map; | 475 host_zoom_map_ = profile_params_->host_zoom_map; |
| 472 host_content_settings_map_ = profile_params_->host_content_settings_map; | 476 host_content_settings_map_ = profile_params_->host_content_settings_map; |
| 473 notification_service_ = profile_params_->notification_service; | 477 notification_service_ = profile_params_->notification_service; |
| 474 extension_info_map_ = profile_params_->extension_info_map; | 478 extension_info_map_ = profile_params_->extension_info_map; |
| 475 prerender_manager_getter_ = profile_params_->prerender_manager_getter; | 479 prerender_manager_getter_ = profile_params_->prerender_manager_getter; |
| 476 | 480 |
| 477 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); | 481 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); |
| 478 resource_context_.set_request_context(main_request_context_); | 482 resource_context_.set_request_context(main_request_context_); |
| 479 resource_context_.set_database_tracker(database_tracker_); | 483 resource_context_.set_database_tracker(database_tracker_); |
| 480 resource_context_.set_appcache_service(appcache_service_); | 484 resource_context_.set_appcache_service(appcache_service_); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 522 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 519 new DeleteTask<ProfileIOData>(this)); | 523 new DeleteTask<ProfileIOData>(this)); |
| 520 if (!posted) | 524 if (!posted) |
| 521 delete this; | 525 delete this; |
| 522 } | 526 } |
| 523 | 527 |
| 524 void ProfileIOData::set_origin_bound_cert_service( | 528 void ProfileIOData::set_origin_bound_cert_service( |
| 525 net::OriginBoundCertService* origin_bound_cert_service) const { | 529 net::OriginBoundCertService* origin_bound_cert_service) const { |
| 526 origin_bound_cert_service_.reset(origin_bound_cert_service); | 530 origin_bound_cert_service_.reset(origin_bound_cert_service); |
| 527 } | 531 } |
| OLD | NEW |