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

Unified Diff: content/public/browser/platform_notification_context.h

Issue 1099093003: Push API: Forced notifications should use Notifications database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Peter's review nits Created 5 years, 8 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
« no previous file with comments | « content/browser/notifications/platform_notification_context_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/platform_notification_context.h
diff --git a/content/public/browser/platform_notification_context.h b/content/public/browser/platform_notification_context.h
index 74dd47100144fec3f20e0d174528b26fc9b91b82..47d6b755a5031cd4fcda09522f0a57b69cc1d9be 100644
--- a/content/public/browser/platform_notification_context.h
+++ b/content/public/browser/platform_notification_context.h
@@ -9,6 +9,8 @@
#include <vector>
#include "base/callback.h"
+#include "base/memory/ref_counted.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_database_data.h"
class GURL;
@@ -18,7 +20,9 @@ namespace content {
// Represents the storage context for persistent Web Notifications, specific to
// the storage partition owning the instance. All methods defined in this
// interface may only be used on the IO thread.
-class PlatformNotificationContext {
+class PlatformNotificationContext
+ : public base::RefCountedThreadSafe<PlatformNotificationContext,
+ BrowserThread::DeleteOnUIThread> {
public:
using ReadResultCallback =
base::Callback<void(bool /* success */,
@@ -65,6 +69,9 @@ class PlatformNotificationContext {
const DeleteResultCallback& callback) = 0;
protected:
+ friend class base::DeleteHelper<PlatformNotificationContext>;
+ friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
+
virtual ~PlatformNotificationContext() {}
};
« no previous file with comments | « content/browser/notifications/platform_notification_context_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698