Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index 85586ac85e6d270d99fc5bf52a2d2ea319e4e404..2c61ad2425e38906f9227327a1a39d74841b63f2 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -514,9 +514,11 @@ void ProfileImpl::DoFinalInit(bool is_new_profile) { |
restore_old_session_cookies, |
GetSpecialStoragePolicy()); |
+#if defined(ENABLE_PLUGINS) |
ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
PluginPrefs::GetForProfile(this), |
io_data_.GetResourceContextNoInit()); |
+#endif |
// Delay README creation to not impact startup performance. |
BrowserThread::PostDelayedTask( |
@@ -593,8 +595,10 @@ ProfileImpl::~ProfileImpl() { |
// Remove pref observers |
pref_change_registrar_.RemoveAll(); |
+#if defined(ENABLE_PLUGINS) |
ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( |
io_data_.GetResourceContextNoInit()); |
+#endif |
// Destroy OTR profile and its profile services first. |
if (off_the_record_profile_.get()) { |