| 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..1bc789447996ff23e0cbbddff33ddd7d20db57c7 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,13 +260,14 @@ void ExtensionManagementEventRouter::Init() {
|
| NotificationType::EXTENSION_UNLOADED
|
| };
|
|
|
| - // Don't re-init (eg in the case of multiple profiles).
|
| - if (registrar_.IsEmpty()) {
|
| - for (size_t i = 0; i < arraysize(types); i++) {
|
| - registrar_.Add(this,
|
| - types[i],
|
| - NotificationService::AllSources());
|
| - }
|
| + CHECK(registrar_.IsEmpty());
|
| + for (size_t i = 0; i < arraysize(types); i++) {
|
| + registrar_.Add(this,
|
| + types[i],
|
| + Source<Profile>(profile));
|
| + registrar_.Add(this,
|
| + types[i],
|
| + Source<Profile>(profile->GetOffTheRecordProfile()));
|
| }
|
| }
|
|
|
|
|