Index: chrome/browser/extensions/extension_management_api.cc |
diff --git a/chrome/browser/extensions/extension_management_api.cc b/chrome/browser/extensions/extension_management_api.cc |
index 0053b1d3a48a60fea7835900faa2f0b9ed91cf00..f7b38563ff48d9ba2e5749baf9a6611e92861937 100644 |
--- a/chrome/browser/extensions/extension_management_api.cc |
+++ b/chrome/browser/extensions/extension_management_api.cc |
@@ -248,16 +248,11 @@ bool UninstallFunction::RunImpl() { |
return true; |
} |
-// static |
-ExtensionManagementEventRouter* ExtensionManagementEventRouter::GetInstance() { |
- return Singleton<ExtensionManagementEventRouter>::get(); |
-} |
- |
ExtensionManagementEventRouter::ExtensionManagementEventRouter() {} |
ExtensionManagementEventRouter::~ExtensionManagementEventRouter() {} |
-void ExtensionManagementEventRouter::Init() { |
+void ExtensionManagementEventRouter::ObserveProfile(Profile* profile) { |
NotificationType::Type types[] = { |
NotificationType::EXTENSION_INSTALLED, |
NotificationType::EXTENSION_UNINSTALLED, |
@@ -265,12 +260,14 @@ void ExtensionManagementEventRouter::Init() { |
NotificationType::EXTENSION_UNLOADED |
}; |
- // Don't re-init (eg in the case of multiple profiles). |
if (registrar_.IsEmpty()) { |
asargent_no_longer_on_chrome
2011/06/23 22:18:38
same question here - if we now expect to have one
Yoyo Zhou
2011/06/24 17:21:38
Done.
|
for (size_t i = 0; i < arraysize(types); i++) { |
registrar_.Add(this, |
types[i], |
- NotificationService::AllSources()); |
+ Source<Profile>(profile)); |
+ registrar_.Add(this, |
+ types[i], |
+ Source<Profile>(profile->GetOffTheRecordProfile())); |
} |
} |
} |