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

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

Issue 2534443002: Use notification display service to collect persistent notifications. (Closed)
Patch Set: fix infinite loop Created 4 years 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 3110a20a7e98e44aed2b8f8fba5227d0d9e2f31e..2a27522abb35ec30dbf47b7ba0b80531fd9a989b 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 <memory>
+#include <set>
#include <string>
#include <vector>
@@ -126,13 +128,25 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
const GURL& origin,
const ReadResultCallback& callback);
+ // Updates the database (and the result callback) based on
+ // |displayed_notifications|
+ // if |sync_supported|. Called on the IO thread.
+ void SynchronizeDisplayedNotificationsForServiceWorkerRegistration(
+ const GURL& origin,
+ int64_t service_worker_registration_id,
+ const ReadAllResultCallback& callback,
+ std::unique_ptr<std::set<std::string>> displayed_notifications,
+ bool sync_supported);
+
// Actually reads all notification data from the database. Must only be
// called on the |task_runner_| thread. |callback| will be invoked on the
// IO thread when the operation has completed.
void DoReadAllNotificationDataForServiceWorkerRegistration(
const GURL& origin,
int64_t service_worker_registration_id,
- const ReadAllResultCallback& callback);
+ const ReadAllResultCallback& callback,
+ std::unique_ptr<std::set<std::string>> displayed_notifications,
+ bool synchronization_supported);
// Actually writes the notification database to the database. Must only be
// called on the |task_runner_| thread. |callback| will be invoked on the

Powered by Google App Engine
This is Rietveld 408576698