Index: chrome/browser/extensions/extension_system.cc |
diff --git a/chrome/browser/extensions/extension_system.cc b/chrome/browser/extensions/extension_system.cc |
index b7099d2884433a18b2a20ab5a69720b2f018b50b..30fb44456d40e165b4f97f54e9946d98ef704fe0 100644 |
--- a/chrome/browser/extensions/extension_system.cc |
+++ b/chrome/browser/extensions/extension_system.cc |
@@ -33,6 +33,8 @@ |
#include "chrome/browser/extensions/state_store.h" |
#include "chrome/browser/extensions/unpacked_installer.h" |
#include "chrome/browser/extensions/user_script_master.h" |
+#include "chrome/browser/notifications/desktop_notification_service.h" |
+#include "chrome/browser/notifications/desktop_notification_service_factory.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
@@ -45,6 +47,7 @@ |
#include "extensions/browser/lazy_background_task_queue.h" |
#include "extensions/common/constants.h" |
#include "extensions/common/manifest.h" |
+#include "ui/message_center/notifier_settings.h" |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/app_mode/app_mode_utils.h" |
@@ -400,11 +403,20 @@ void ExtensionSystemImpl::RegisterExtensionWithRequestContexts( |
} |
bool incognito_enabled = |
extension_util::IsIncognitoEnabled(extension->id(), extension_service()); |
+ message_center::NotifierId notifier_id( |
+ message_center::NotifierId::APPLICATION, |
+ extension->id()); |
+ |
+ DesktopNotificationService* notification_service = |
+ DesktopNotificationServiceFactory::GetForProfile(profile_); |
+ bool notifications_disabled = |
+ !notification_service->IsNotifierEnabled(notifier_id); |
+ |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
base::Bind(&ExtensionInfoMap::AddExtension, info_map(), |
make_scoped_refptr(extension), install_time, |
- incognito_enabled)); |
+ incognito_enabled, notifications_disabled)); |
} |
void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |