Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4379)

Unified Diff: chrome/browser/extensions/extension_process_manager.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698