diff options
author | dewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-13 20:23:31 +0000 |
---|---|---|
committer | dewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-13 20:23:31 +0000 |
commit | 9afacd27ad2436db5efce5a71febe8d8b169bee7 (patch) | |
tree | 0432b0902c76cac3b065946a5053ae03a8256d25 /extensions/browser/info_map.h | |
parent | 33843bba42f92361e817339e3ba8ac2153dee056 (diff) | |
download | chromium_src-9afacd27ad2436db5efce5a71febe8d8b169bee7.zip chromium_src-9afacd27ad2436db5efce5a71febe8d8b169bee7.tar.gz chromium_src-9afacd27ad2436db5efce5a71febe8d8b169bee7.tar.bz2 |
Fix broken threading model in CheckDesktopNotificationPermission
Over time, this function (which is called on the IO thread) was updated
to use DesktopNotificationService. While the methods in that service
were enforced to run on the correct thread, it's not possible to get
the notification service from the ProfileIOData safely. This removes the
dependency on DesktopNotificationService from the IO-thread notification
functions.
BUG=256638
Review URL: https://codereview.chromium.org/61323002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/info_map.h')
-rw-r--r-- | extensions/browser/info_map.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/extensions/browser/info_map.h b/extensions/browser/info_map.h index d68933f..407982c 100644 --- a/extensions/browser/info_map.h +++ b/extensions/browser/info_map.h @@ -35,7 +35,8 @@ class InfoMap : public base::RefCountedThreadSafe<InfoMap> { // Callback for when new extensions are loaded. void AddExtension(const extensions::Extension* extension, base::Time install_time, - bool incognito_enabled); + bool incognito_enabled, + bool notifications_disabled); // Callback for when an extension is unloaded. void RemoveExtension(const std::string& extension_id, @@ -85,6 +86,12 @@ class InfoMap : public base::RefCountedThreadSafe<InfoMap> { void SetSigninProcess(int process_id); bool IsSigninProcess(int process_id) const; + // Notifications can be enabled/disabled in real time by the user. + void SetNotificationsDisabled(const std::string& extension_id, + bool notifications_disabled); + bool AreNotificationsDisabled(const std::string& extension_id) + const; + private: friend class base::RefCountedThreadSafe<InfoMap>; |