| Index: chrome/browser/profiles/profile_io_data.cc
|
| diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
|
| index 79687b57c51c3213f84df07b18aad6803311d354..62654da99374abc4fd1711deeac44f5d442468e1 100644
|
| --- a/chrome/browser/profiles/profile_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_io_data.cc
|
| @@ -12,9 +12,11 @@
|
| #include "base/logging.h"
|
| #include "base/stl_util-inl.h"
|
| #include "base/string_number_conversions.h"
|
| +#include "base/task.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/content_settings/host_content_settings_map.h"
|
| #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
|
| +#include "chrome/browser/extensions/extension_info_map.h"
|
| #include "chrome/browser/extensions/extension_protocols.h"
|
| #include "chrome/browser/io_thread.h"
|
| #include "chrome/browser/media/media_internals.h"
|
| @@ -32,7 +34,9 @@
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/common/url_constants.h"
|
| +#include "content/browser/appcache/chrome_appcache_service.h"
|
| #include "content/browser/browser_thread.h"
|
| +#include "content/browser/chrome_blob_storage_context.h"
|
| #include "content/browser/host_zoom_map.h"
|
| #include "content/browser/renderer_host/resource_dispatcher_host.h"
|
| #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
|
| @@ -45,6 +49,7 @@
|
| #include "net/url_request/url_request.h"
|
| #include "webkit/blob/blob_data.h"
|
| #include "webkit/blob/blob_url_request_job_factory.h"
|
| +#include "webkit/fileapi/file_system_context.h"
|
| #include "webkit/fileapi/file_system_url_request_job_factory.h"
|
| #include "webkit/database/database_tracker.h"
|
| #include "webkit/quota/quota_manager.h"
|
| @@ -282,14 +287,7 @@ ProfileIOData::ProfileIOData(bool is_incognito)
|
| }
|
|
|
| ProfileIOData::~ProfileIOData() {
|
| - // If we have never initialized ProfileIOData, then Handle may hold the only
|
| - // reference to it. The important thing is to make sure it hasn't been
|
| - // initialized yet, because the lazily initialized variables are supposed to
|
| - // live on the IO thread.
|
| - if (BrowserThread::CurrentlyOn(BrowserThread::UI))
|
| - DCHECK(!initialized_);
|
| - else
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| }
|
|
|
| // static
|
| @@ -321,6 +319,16 @@ bool ProfileIOData::IsHandledURL(const GURL& url) {
|
| return IsHandledProtocol(url.scheme());
|
| }
|
|
|
| +const content::ResourceContext& ProfileIOData::GetResourceContext() const {
|
| + return resource_context_;
|
| +}
|
| +
|
| +ChromeURLDataManagerBackend*
|
| +ProfileIOData::GetChromeURLDataManagerBackend() const {
|
| + LazyInitialize();
|
| + return chrome_url_data_manager_backend_.get();
|
| +}
|
| +
|
| scoped_refptr<ChromeURLRequestContext>
|
| ProfileIOData::GetMainRequestContext() const {
|
| LazyInitialize();
|
| @@ -360,10 +368,6 @@ ProfileIOData::GetIsolatedAppRequestContext(
|
| return context;
|
| }
|
|
|
| -const content::ResourceContext& ProfileIOData::GetResourceContext() const {
|
| - return resource_context_;
|
| -}
|
| -
|
| ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const {
|
| return extension_info_map_;
|
| }
|
| @@ -440,7 +444,8 @@ void ProfileIOData::LazyInitialize() const {
|
| chrome::kChromeUIScheme,
|
| ChromeURLDataManagerBackend::CreateProtocolHandler(
|
| chrome_url_data_manager_backend_.get(),
|
| - profile_params_->appcache_service));
|
| + profile_params_->appcache_service,
|
| + profile_params_->blob_storage_context->controller()));
|
| DCHECK(set_protocol);
|
| set_protocol = job_factory_->SetProtocolHandler(
|
| chrome::kChromeDevToolsScheme,
|
| @@ -506,14 +511,12 @@ void ProfileIOData::ApplyProfileParamsToContext(
|
| context->set_transport_security_state(
|
| profile_params_->transport_security_state);
|
| context->set_ssl_config_service(profile_params_->ssl_config_service);
|
| - context->set_appcache_service(profile_params_->appcache_service);
|
| - context->set_blob_storage_context(profile_params_->blob_storage_context);
|
| - context->set_file_system_context(profile_params_->file_system_context);
|
| - context->set_extension_info_map(profile_params_->extension_info_map);
|
| }
|
|
|
| void ProfileIOData::ShutdownOnUIThread() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| enable_referrers_.Destroy();
|
| clear_local_state_on_exit_.Destroy();
|
| + BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
| + new ReleaseTask<ProfileIOData>(this));
|
| }
|
|
|