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

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

Issue 2749453002: Make GetDisplayedNotifications asynchronous. (Closed)
Patch Set: revert early bailout if there is no service Created 3 years, 9 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 2a27522abb35ec30dbf47b7ba0b80531fd9a989b..440afab86981a1f7bdd8767405fc265b48cfe142 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -101,7 +101,12 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
~PlatformNotificationContextImpl() override;
- void InitializeOnIO();
+ void DidGetNotificationsOnUI(
+ std::unique_ptr<std::set<std::string>> displayed_notifications,
+ bool notification_synchronization_supported);
+ void InitializeOnIO(
+ std::unique_ptr<std::set<std::string>> displayed_notifications,
+ bool notification_synchronization_supported);
void ShutdownOnIO();
void CreateServiceOnIO(
int render_process_id,
@@ -130,8 +135,18 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
// Updates the database (and the result callback) based on
// |displayed_notifications|
- // if |sync_supported|. Called on the IO thread.
- void SynchronizeDisplayedNotificationsForServiceWorkerRegistration(
+ // if |sync_supported|.
+ void SynchronizeDisplayedNotificationsForServiceWorkerRegistrationOnUI(
+ const GURL& origin,
+ int64_t service_worker_registration_id,
+ const ReadAllResultCallback& callback,
+ std::unique_ptr<std::set<std::string>> displayed_notifications,
+ bool sync_supported);
+
+ // Updates the database (and the result callback) based on
+ // |displayed_notifications|
+ // if |sync_supported|.
Peter Beverloo 2017/03/17 15:46:04 nit: fix weird line break (also on line 137)
Miguel Garcia 2017/03/20 14:11:21 Done.
+ void SynchronizeDisplayedNotificationsForServiceWorkerRegistrationOnIO(
const GURL& origin,
int64_t service_worker_registration_id,
const ReadAllResultCallback& callback,

Powered by Google App Engine
This is Rietveld 408576698