| 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 6821a5fe2da6e7a51759047554cb88dd1e6b217d..4b56e6299c67b38343c834aa9a49b3a925f1854f 100644
|
| --- a/chrome/browser/profiles/profile_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_io_data.cc
|
| @@ -188,7 +188,6 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
|
|
|
| params->io_thread = g_browser_process->io_thread();
|
|
|
| - params->host_content_settings_map = profile->GetHostContentSettingsMap();
|
| params->cookie_settings = CookieSettings::Factory::GetForProfile(profile);
|
| params->ssl_config_service = profile->GetSSLConfigService();
|
| base::Callback<Profile*(void)> profile_getter =
|
| @@ -258,7 +257,8 @@ ProfileIOData::ProfileParams::~ProfileParams() {}
|
|
|
| ProfileIOData::ProfileIOData(bool is_incognito)
|
| : initialized_(false),
|
| - ALLOW_THIS_IN_INITIALIZER_LIST(resource_context_(this)),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(
|
| + resource_context_(new ResourceContext(this))),
|
| initialized_on_UI_thread_(false) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| }
|
| @@ -317,7 +317,7 @@ bool ProfileIOData::IsHandledURL(const GURL& url) {
|
| }
|
|
|
| content::ResourceContext* ProfileIOData::GetResourceContext() const {
|
| - return &resource_context_;
|
| + return resource_context_.get();
|
| }
|
|
|
| ChromeURLDataManagerBackend*
|
| @@ -367,10 +367,6 @@ ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const {
|
| return extension_info_map_;
|
| }
|
|
|
| -HostContentSettingsMap* ProfileIOData::GetHostContentSettingsMap() const {
|
| - return host_content_settings_map_;
|
| -}
|
| -
|
| CookieSettings* ProfileIOData::GetCookieSettings() const {
|
| return cookie_settings_;
|
| }
|
| @@ -503,15 +499,14 @@ void ProfileIOData::LazyInitialize() const {
|
| #endif // defined(OS_CHROMEOS) && !defined(GOOGLE_CHROME_BUILD)
|
|
|
| // Take ownership over these parameters.
|
| - host_content_settings_map_ = profile_params_->host_content_settings_map;
|
| cookie_settings_ = profile_params_->cookie_settings;
|
| #if defined(ENABLE_NOTIFICATIONS)
|
| notification_service_ = profile_params_->notification_service;
|
| #endif
|
| extension_info_map_ = profile_params_->extension_info_map;
|
|
|
| - resource_context_.host_resolver_ = io_thread_globals->host_resolver.get();
|
| - resource_context_.request_context_ = main_request_context_;
|
| + resource_context_->host_resolver_ = io_thread_globals->host_resolver.get();
|
| + resource_context_->request_context_ = main_request_context_;
|
|
|
| LazyInitializeInternal(profile_params_.get());
|
|
|
| @@ -547,3 +542,7 @@ void ProfileIOData::set_server_bound_cert_service(
|
| net::ServerBoundCertService* server_bound_cert_service) const {
|
| server_bound_cert_service_.reset(server_bound_cert_service);
|
| }
|
| +
|
| +void ProfileIOData::DestroyResourceContext() {
|
| + resource_context_.reset();
|
| +}
|
|
|