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

Unified Diff: content/browser/notifications/platform_notification_context_impl.h

Issue 1127013008: Beginnings of synchronizing notifications in the notification database. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: content/browser/notifications/platform_notification_context_impl.h
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
index c6b370d4b4b70df50ca7151c5c7e94a203fa0e99..a41729b9944b12eb8fb10800ddbbca6cfa2a19db 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -6,6 +6,8 @@
#define CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_
#include <stdint.h>
+#include <set>
+#include <string>
#include "base/callback.h"
#include "base/compiler_specific.h"
@@ -25,6 +27,7 @@ class SequencedTaskRunner;
namespace content {
+class BrowserContext;
class NotificationDatabase;
struct NotificationDatabaseData;
class ServiceWorkerContextWrapper;
@@ -42,6 +45,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
// constructor must only be called on the IO thread.
PlatformNotificationContextImpl(
const base::FilePath& path,
+ BrowserContext* browser_context,
const scoped_refptr<ServiceWorkerContextWrapper>& service_worker_context);
// To be called on the UI thread to initialize the instance.
@@ -139,12 +143,16 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
const scoped_refptr<base::SequencedTaskRunner>& task_runner);
base::FilePath path_;
+ BrowserContext* browser_context_;
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
scoped_ptr<NotificationDatabase> database_;
+ // Indicates whether the database should be pruned when it's opened.
+ bool prune_database_on_open_ = false;
+
DISALLOW_COPY_AND_ASSIGN(PlatformNotificationContextImpl);
};

Powered by Google App Engine
This is Rietveld 408576698