| Index: chrome/browser/extensions/extension_process_manager.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/extension_process_manager.cc (revision 91771)
|
| +++ chrome/browser/extensions/extension_process_manager.cc (working copy)
|
| @@ -13,12 +13,12 @@
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser.h"
|
| +#include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "content/browser/site_instance.h"
|
| #include "content/browser/tab_contents/tab_contents.h"
|
| #include "content/common/notification_service.h"
|
| -#include "content/common/notification_type.h"
|
|
|
| namespace {
|
|
|
| @@ -87,13 +87,13 @@
|
| ExtensionProcessManager::ExtensionProcessManager(Profile* profile)
|
| : browsing_instance_(new BrowsingInstance(profile)) {
|
| Profile* original_profile = profile->GetOriginalProfile();
|
| - registrar_.Add(this, NotificationType::EXTENSIONS_READY,
|
| + registrar_.Add(this, chrome::EXTENSIONS_READY,
|
| Source<Profile>(original_profile));
|
| - registrar_.Add(this, NotificationType::EXTENSION_LOADED,
|
| + registrar_.Add(this, chrome::EXTENSION_LOADED,
|
| Source<Profile>(original_profile));
|
| - registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
|
| + registrar_.Add(this, chrome::EXTENSION_UNLOADED,
|
| Source<Profile>(original_profile));
|
| - registrar_.Add(this, NotificationType::EXTENSION_HOST_DESTROYED,
|
| + registrar_.Add(this, chrome::EXTENSION_HOST_DESTROYED,
|
| Source<Profile>(profile));
|
| registrar_.Add(this, NotificationType::RENDERER_PROCESS_TERMINATED,
|
| NotificationService::AllSources());
|
| @@ -273,13 +273,13 @@
|
| const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| switch (type.value) {
|
| - case NotificationType::EXTENSIONS_READY: {
|
| + case chrome::EXTENSIONS_READY: {
|
| CreateBackgroundHosts(this,
|
| Source<Profile>(source).ptr()->GetExtensionService()->extensions());
|
| break;
|
| }
|
|
|
| - case NotificationType::EXTENSION_LOADED: {
|
| + case chrome::EXTENSION_LOADED: {
|
| ExtensionService* service =
|
| Source<Profile>(source).ptr()->GetExtensionService();
|
| if (service->is_ready()) {
|
| @@ -289,7 +289,7 @@
|
| break;
|
| }
|
|
|
| - case NotificationType::EXTENSION_UNLOADED: {
|
| + case chrome::EXTENSION_UNLOADED: {
|
| const Extension* extension =
|
| Details<UnloadedExtensionInfo>(details)->extension;
|
| for (ExtensionHostSet::iterator iter = background_hosts_.begin();
|
| @@ -305,7 +305,7 @@
|
| break;
|
| }
|
|
|
| - case NotificationType::EXTENSION_HOST_DESTROYED: {
|
| + case chrome::EXTENSION_HOST_DESTROYED: {
|
| ExtensionHost* host = Details<ExtensionHost>(details).ptr();
|
| all_hosts_.erase(host);
|
| background_hosts_.erase(host);
|
| @@ -340,7 +340,7 @@
|
| if (is_background)
|
| background_hosts_.insert(host);
|
| NotificationService::current()->Notify(
|
| - NotificationType::EXTENSION_HOST_CREATED,
|
| + chrome::EXTENSION_HOST_CREATED,
|
| Source<ExtensionProcessManager>(this),
|
| Details<ExtensionHost>(host));
|
| }
|
| @@ -365,7 +365,7 @@
|
| GetExtensionProcessManager()) {
|
| DCHECK(profile->IsOffTheRecord());
|
|
|
| - registrar_.Add(this, NotificationType::BROWSER_WINDOW_READY,
|
| + registrar_.Add(this, chrome::BROWSER_WINDOW_READY,
|
| NotificationService::AllSources());
|
| }
|
|
|
| @@ -443,7 +443,7 @@
|
| const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| switch (type.value) {
|
| - case NotificationType::BROWSER_WINDOW_READY: {
|
| + case chrome::BROWSER_WINDOW_READY: {
|
| // We want to spawn our background hosts as soon as the user opens an
|
| // incognito window. Watch for new browsers and create the hosts if
|
| // it matches our profile.
|
|
|