Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index 1ddbd122895ac883110c5486aaebf3e1754d3f95..9adaab2789d9de4f389d5fca906db6c7a05ec927 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -21,6 +21,7 @@ |
#include "chrome/browser/bookmarks/bookmark_model.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/browsing_data_remover.h" |
+#include "chrome/browser/chrome_plugin_service_filter.h" |
#include "chrome/browser/content_settings/host_content_settings_map.h" |
#include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
#include "chrome/browser/defaults.h" |
@@ -49,6 +50,7 @@ |
#include "chrome/browser/net/pref_proxy_config_service.h" |
#include "chrome/browser/net/ssl_config_service_manager.h" |
#include "chrome/browser/password_manager/password_store_default.h" |
+#include "chrome/browser/plugin_prefs.h" |
#include "chrome/browser/policy/configuration_policy_pref_store.h" |
#include "chrome/browser/prefs/browser_prefs.h" |
#include "chrome/browser/prefs/pref_value_store.h" |
@@ -659,6 +661,11 @@ void ProfileImpl::set_last_selected_directory(const FilePath& path) { |
GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory, path); |
} |
+ProfileImpl::ProfileImpl() : ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)) { |
+ ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
+ PluginPrefs::GetForProfile(this), &GetResourceContext()); |
+} |
+ |
ProfileImpl::~ProfileImpl() { |
NotificationService::current()->Notify( |
chrome::NOTIFICATION_PROFILE_DESTROYED, |
@@ -687,6 +694,9 @@ ProfileImpl::~ProfileImpl() { |
// of the cleanup below. |
sync_service_.reset(); |
+ ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( |
+ &GetResourceContext()); |
+ |
ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); |
if (db_tracker_) { |