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

Unified Diff: content/browser/push_messaging/push_messaging_message_filter.h

Issue 778243002: Push API: Return cached registration if available. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@store2
Patch Set: Rebase Created 6 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/push_messaging/push_messaging_message_filter.h
diff --git a/content/browser/push_messaging/push_messaging_message_filter.h b/content/browser/push_messaging/push_messaging_message_filter.h
index cfb2f6afeb6aef31991017c80f07929ea2d7bc7c..942473968af72e68c9c6b6d52aca4fbf76e1614a 100644
--- a/content/browser/push_messaging/push_messaging_message_filter.h
+++ b/content/browser/push_messaging/push_messaging_message_filter.h
@@ -70,6 +70,15 @@ class PushMessagingMessageFilter : public BrowserMessageFilter {
void OnGetPermissionStatus(int request_id,
int64 service_worker_registration_id);
+ void CheckForExistingRegistration(const RegisterData& data,
+ const std::string& sender_id);
+
+ void DidCheckForExistingRegistration(
+ const RegisterData& data,
+ const std::string& sender_id,
+ const std::string& push_registration_id,
+ ServiceWorkerStatusCode service_worker_status);
+
void RegisterOnUI(const RegisterData& data,
const std::string& sender_id);
@@ -98,8 +107,12 @@ class PushMessagingMessageFilter : public BrowserMessageFilter {
void SendRegisterError(const RegisterData& data,
PushRegistrationStatus status);
void SendRegisterSuccess(const RegisterData& data,
+ PushRegistrationStatus status,
const GURL& push_endpoint,
const std::string& push_registration_id);
+ void SendRegisterSuccessOnUI(const RegisterData& data,
+ PushRegistrationStatus status,
+ const std::string& push_registration_id);
// Returns a push messaging service. The embedder owns the service, and is
// responsible for ensuring that it outlives RenderProcessHost. It's valid to
« no previous file with comments | « chrome/test/data/push_messaging/subscope2/test.html ('k') | content/browser/push_messaging/push_messaging_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698