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

Unified Diff: chrome/browser/notifications/desktop_notification_service.h

Issue 582673002: Fixed Build breaks while notification is enabled and extension is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review comments Created 6 years, 3 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/notifications/desktop_notification_service.h
diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h
index ca71f572935e3bb6841c20a7dfbecbd2626cf105..61b7fde4c2f0c8edfa243ec3d889590871ede93b 100644
--- a/chrome/browser/notifications/desktop_notification_service.h
+++ b/chrome/browser/notifications/desktop_notification_service.h
@@ -58,9 +58,12 @@ typedef base::Callback<void(blink::WebNotificationPermission)>
// The DesktopNotificationService is an object, owned by the Profile,
// which provides the creation of desktop "toasts" to web pages and workers.
-class DesktopNotificationService
- : public PermissionContextBase,
- public extensions::ExtensionRegistryObserver {
+class DesktopNotificationService : public PermissionContextBase
+#if defined(ENABLE_EXTENSIONS)
+ ,
+ public extensions::ExtensionRegistryObserver
+#endif
+ {
public:
// Register profile-specific prefs of notifications.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* prefs);
@@ -130,11 +133,13 @@ class DesktopNotificationService
const message_center::NotifierId& notifier_id,
bool enabled);
+#if defined(ENABLE_EXTENSIONS)
// extensions::ExtensionRegistryObserver:
virtual void OnExtensionUninstalled(
content::BrowserContext* browser_context,
const extensions::Extension* extension,
extensions::UninstallReason reason) OVERRIDE;
+#endif
// The profile which owns this object.
Profile* profile_;
@@ -151,10 +156,12 @@ class DesktopNotificationService
// On-memory data for the availability of system_component.
std::set<std::string> disabled_system_component_ids_;
+#if defined(ENABLE_EXTENSIONS)
// An observer to listen when extension is uninstalled.
ScopedObserver<extensions::ExtensionRegistry,
extensions::ExtensionRegistryObserver>
extension_registry_observer_;
+#endif
// Welcome Notification
scoped_ptr<ExtensionWelcomeNotification> chrome_now_welcome_notification_;

Powered by Google App Engine
This is Rietveld 408576698