| 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/download/download_service_factory.h" | 23 #include "chrome/browser/download/download_service_factory.h" |
| 24 #include "chrome/browser/extensions/extension_info_map.h" | 24 #include "chrome/browser/extensions/extension_info_map.h" |
| 25 #include "chrome/browser/extensions/extension_protocols.h" | 25 #include "chrome/browser/extensions/extension_protocols.h" |
| 26 #include "chrome/browser/io_thread.h" | 26 #include "chrome/browser/io_thread.h" |
| 27 #include "chrome/browser/media/media_internals.h" | 27 #include "chrome/browser/media/media_internals.h" |
| 28 #include "chrome/browser/net/chrome_cookie_notification_details.h" | 28 #include "chrome/browser/net/chrome_cookie_notification_details.h" |
| 29 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 29 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" |
| 30 #include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h" | 30 #include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h" |
| 31 #include "chrome/browser/net/chrome_net_log.h" | 31 #include "chrome/browser/net/chrome_net_log.h" |
| 32 #include "chrome/browser/net/chrome_network_delegate.h" | 32 #include "chrome/browser/net/chrome_network_delegate.h" |
| 33 #include "chrome/browser/net/pref_proxy_config_service.h" | |
| 34 #include "chrome/browser/net/proxy_service_factory.h" | 33 #include "chrome/browser/net/proxy_service_factory.h" |
| 35 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 34 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 36 #include "chrome/browser/policy/url_blacklist_manager.h" | 35 #include "chrome/browser/policy/url_blacklist_manager.h" |
| 37 #include "chrome/browser/prefs/pref_service.h" | 36 #include "chrome/browser/prefs/pref_service.h" |
| 38 #include "chrome/browser/profiles/profile.h" | 37 #include "chrome/browser/profiles/profile.h" |
| 39 #include "chrome/browser/profiles/profile_manager.h" | 38 #include "chrome/browser/profiles/profile_manager.h" |
| 40 #include "chrome/browser/transport_security_persister.h" | 39 #include "chrome/browser/transport_security_persister.h" |
| 41 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 40 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 42 #include "chrome/common/chrome_notification_types.h" | 41 #include "chrome/common/chrome_notification_types.h" |
| 43 #include "chrome/common/chrome_switches.h" | 42 #include "chrome/common/chrome_switches.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 62 #include "net/url_request/url_request.h" | 61 #include "net/url_request/url_request.h" |
| 63 #include "webkit/blob/blob_data.h" | 62 #include "webkit/blob/blob_data.h" |
| 64 #include "webkit/blob/blob_url_request_job_factory.h" | 63 #include "webkit/blob/blob_url_request_job_factory.h" |
| 65 #include "webkit/database/database_tracker.h" | 64 #include "webkit/database/database_tracker.h" |
| 66 #include "webkit/fileapi/file_system_context.h" | 65 #include "webkit/fileapi/file_system_context.h" |
| 67 #include "webkit/fileapi/file_system_url_request_job_factory.h" | 66 #include "webkit/fileapi/file_system_url_request_job_factory.h" |
| 68 #include "webkit/quota/quota_manager.h" | 67 #include "webkit/quota/quota_manager.h" |
| 69 | 68 |
| 70 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
| 71 #include "chrome/browser/chromeos/gview_request_interceptor.h" | 70 #include "chrome/browser/chromeos/gview_request_interceptor.h" |
| 71 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 72 #endif // defined(OS_CHROMEOS) | 72 #endif // defined(OS_CHROMEOS) |
| 73 | 73 |
| 74 using content::BrowserThread; | 74 using content::BrowserThread; |
| 75 | 75 |
| 76 namespace { | 76 namespace { |
| 77 | 77 |
| 78 // ---------------------------------------------------------------------------- | 78 // ---------------------------------------------------------------------------- |
| 79 // CookieMonster::Delegate implementation | 79 // CookieMonster::Delegate implementation |
| 80 // ---------------------------------------------------------------------------- | 80 // ---------------------------------------------------------------------------- |
| 81 class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate { | 81 class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate { |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 params->database_tracker = profile->GetDatabaseTracker(); | 236 params->database_tracker = profile->GetDatabaseTracker(); |
| 237 params->appcache_service = profile->GetAppCacheService(); | 237 params->appcache_service = profile->GetAppCacheService(); |
| 238 params->blob_storage_context = profile->GetBlobStorageContext(); | 238 params->blob_storage_context = profile->GetBlobStorageContext(); |
| 239 params->file_system_context = profile->GetFileSystemContext(); | 239 params->file_system_context = profile->GetFileSystemContext(); |
| 240 params->quota_manager = profile->GetQuotaManager(); | 240 params->quota_manager = profile->GetQuotaManager(); |
| 241 params->extension_info_map = profile->GetExtensionInfoMap(); | 241 params->extension_info_map = profile->GetExtensionInfoMap(); |
| 242 params->notification_service = | 242 params->notification_service = |
| 243 DesktopNotificationServiceFactory::GetForProfile(profile); | 243 DesktopNotificationServiceFactory::GetForProfile(profile); |
| 244 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); | 244 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); |
| 245 | 245 |
| 246 params->proxy_config_service.reset( | 246 ChromeProxyConfigService* proxy_config_service = |
| 247 ProxyServiceFactory::CreateProxyConfigService( | 247 ProxyServiceFactory::CreateProxyConfigService(); |
| 248 profile->GetProxyConfigTracker())); | 248 params->proxy_config_service.reset(proxy_config_service); |
| 249 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( |
| 250 proxy_config_service); |
| 249 params->profile = profile; | 251 params->profile = profile; |
| 250 profile_params_.reset(params.release()); | 252 profile_params_.reset(params.release()); |
| 251 | 253 |
| 252 // The URLBlacklistManager has to be created on the UI thread to register | 254 // The URLBlacklistManager has to be created on the UI thread to register |
| 253 // observers of |pref_service|, and it also has to clean up on | 255 // observers of |pref_service|, and it also has to clean up on |
| 254 // ShutdownOnUIThread to release these observers on the right thread. | 256 // ShutdownOnUIThread to release these observers on the right thread. |
| 255 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, | 257 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, |
| 256 // in particular when this ProfileIOData isn't |initialized_| during deletion. | 258 // in particular when this ProfileIOData isn't |initialized_| during deletion. |
| 257 #if defined(ENABLE_CONFIGURATION_POLICY) | 259 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 258 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); | 260 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 557 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 556 new DeleteTask<ProfileIOData>(this)); | 558 new DeleteTask<ProfileIOData>(this)); |
| 557 if (!posted) | 559 if (!posted) |
| 558 delete this; | 560 delete this; |
| 559 } | 561 } |
| 560 | 562 |
| 561 void ProfileIOData::set_origin_bound_cert_service( | 563 void ProfileIOData::set_origin_bound_cert_service( |
| 562 net::OriginBoundCertService* origin_bound_cert_service) const { | 564 net::OriginBoundCertService* origin_bound_cert_service) const { |
| 563 origin_bound_cert_service_.reset(origin_bound_cert_service); | 565 origin_bound_cert_service_.reset(origin_bound_cert_service); |
| 564 } | 566 } |
| OLD | NEW |