| 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" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
| 16 #include "base/task.h" | 16 #include "base/task.h" |
| 17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 18 #include "chrome/browser/content_settings/host_content_settings_map.h" | 18 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 20 #include "chrome/browser/extensions/extension_info_map.h" | 20 #include "chrome/browser/extensions/extension_info_map.h" |
| 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_fraudulent_certificate_reporter.h" | 26 #include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h" |
| 27 #include "chrome/browser/net/chrome_net_log.h" | 27 #include "chrome/browser/net/chrome_net_log.h" |
| 28 #include "chrome/browser/net/chrome_network_delegate.h" | 28 #include "chrome/browser/net/chrome_network_delegate.h" |
| 29 #include "chrome/browser/net/pref_proxy_config_service.h" | |
| 30 #include "chrome/browser/net/proxy_service_factory.h" | 29 #include "chrome/browser/net/proxy_service_factory.h" |
| 31 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 30 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 32 #include "chrome/browser/policy/url_blacklist_manager.h" | 31 #include "chrome/browser/policy/url_blacklist_manager.h" |
| 33 #include "chrome/browser/prefs/pref_service.h" | 32 #include "chrome/browser/prefs/pref_service.h" |
| 34 #include "chrome/browser/profiles/profile.h" | 33 #include "chrome/browser/profiles/profile.h" |
| 35 #include "chrome/browser/profiles/profile_manager.h" | 34 #include "chrome/browser/profiles/profile_manager.h" |
| 36 #include "chrome/browser/transport_security_persister.h" | 35 #include "chrome/browser/transport_security_persister.h" |
| 37 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 36 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 38 #include "chrome/common/chrome_notification_types.h" | 37 #include "chrome/common/chrome_notification_types.h" |
| 39 #include "chrome/common/chrome_switches.h" | 38 #include "chrome/common/chrome_switches.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 57 #include "net/url_request/url_request.h" | 56 #include "net/url_request/url_request.h" |
| 58 #include "webkit/blob/blob_data.h" | 57 #include "webkit/blob/blob_data.h" |
| 59 #include "webkit/blob/blob_url_request_job_factory.h" | 58 #include "webkit/blob/blob_url_request_job_factory.h" |
| 60 #include "webkit/database/database_tracker.h" | 59 #include "webkit/database/database_tracker.h" |
| 61 #include "webkit/fileapi/file_system_context.h" | 60 #include "webkit/fileapi/file_system_context.h" |
| 62 #include "webkit/fileapi/file_system_url_request_job_factory.h" | 61 #include "webkit/fileapi/file_system_url_request_job_factory.h" |
| 63 #include "webkit/quota/quota_manager.h" | 62 #include "webkit/quota/quota_manager.h" |
| 64 | 63 |
| 65 #if defined(OS_CHROMEOS) | 64 #if defined(OS_CHROMEOS) |
| 66 #include "chrome/browser/chromeos/gview_request_interceptor.h" | 65 #include "chrome/browser/chromeos/gview_request_interceptor.h" |
| 66 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 67 #endif // defined(OS_CHROMEOS) | 67 #endif // defined(OS_CHROMEOS) |
| 68 | 68 |
| 69 namespace { | 69 namespace { |
| 70 | 70 |
| 71 // ---------------------------------------------------------------------------- | 71 // ---------------------------------------------------------------------------- |
| 72 // CookieMonster::Delegate implementation | 72 // CookieMonster::Delegate implementation |
| 73 // ---------------------------------------------------------------------------- | 73 // ---------------------------------------------------------------------------- |
| 74 class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate { | 74 class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate { |
| 75 public: | 75 public: |
| 76 explicit ChromeCookieMonsterDelegate( | 76 explicit ChromeCookieMonsterDelegate( |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 params->database_tracker = profile->GetDatabaseTracker(); | 230 params->database_tracker = profile->GetDatabaseTracker(); |
| 231 params->appcache_service = profile->GetAppCacheService(); | 231 params->appcache_service = profile->GetAppCacheService(); |
| 232 params->blob_storage_context = profile->GetBlobStorageContext(); | 232 params->blob_storage_context = profile->GetBlobStorageContext(); |
| 233 params->file_system_context = profile->GetFileSystemContext(); | 233 params->file_system_context = profile->GetFileSystemContext(); |
| 234 params->quota_manager = profile->GetQuotaManager(); | 234 params->quota_manager = profile->GetQuotaManager(); |
| 235 params->extension_info_map = profile->GetExtensionInfoMap(); | 235 params->extension_info_map = profile->GetExtensionInfoMap(); |
| 236 params->notification_service = | 236 params->notification_service = |
| 237 DesktopNotificationServiceFactory::GetForProfile(profile); | 237 DesktopNotificationServiceFactory::GetForProfile(profile); |
| 238 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); | 238 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); |
| 239 | 239 |
| 240 params->proxy_config_service.reset( | 240 ChromeProxyConfigService* proxy_config_service = |
| 241 ProxyServiceFactory::CreateProxyConfigService( | 241 ProxyServiceFactory::CreateProxyConfigService(); |
| 242 profile->GetProxyConfigTracker())); | 242 params->proxy_config_service.reset(proxy_config_service); |
| 243 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( |
| 244 proxy_config_service); |
| 243 params->profile = profile; | 245 params->profile = profile; |
| 244 profile_params_.reset(params.release()); | 246 profile_params_.reset(params.release()); |
| 245 | 247 |
| 246 // The URLBlacklistManager has to be created on the UI thread to register | 248 // The URLBlacklistManager has to be created on the UI thread to register |
| 247 // observers of |pref_service|, and it also has to clean up on | 249 // observers of |pref_service|, and it also has to clean up on |
| 248 // ShutdownOnUIThread to release these observers on the right thread. | 250 // ShutdownOnUIThread to release these observers on the right thread. |
| 249 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, | 251 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, |
| 250 // in particular when this ProfileIOData isn't |initialized_| during deletion. | 252 // in particular when this ProfileIOData isn't |initialized_| during deletion. |
| 251 #if defined(ENABLE_CONFIGURATION_POLICY) | 253 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 252 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); | 254 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 538 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 537 new DeleteTask<ProfileIOData>(this)); | 539 new DeleteTask<ProfileIOData>(this)); |
| 538 if (!posted) | 540 if (!posted) |
| 539 delete this; | 541 delete this; |
| 540 } | 542 } |
| 541 | 543 |
| 542 void ProfileIOData::set_origin_bound_cert_service( | 544 void ProfileIOData::set_origin_bound_cert_service( |
| 543 net::OriginBoundCertService* origin_bound_cert_service) const { | 545 net::OriginBoundCertService* origin_bound_cert_service) const { |
| 544 origin_bound_cert_service_.reset(origin_bound_cert_service); | 546 origin_bound_cert_service_.reset(origin_bound_cert_service); |
| 545 } | 547 } |
| OLD | NEW |