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

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

Issue 1129833003: Rename "register" -> "subscribe" in the Push Messaging code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@p-userVisible-tests
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/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 afd8d6743a47550fb68984286bbc2955cd54fe11..8087c0240d8324c7926315d153619a40275458ff 100644
--- a/content/browser/push_messaging/push_messaging_message_filter.h
+++ b/content/browser/push_messaging/push_messaging_message_filter.h
@@ -24,7 +24,7 @@ class PushMessagingService;
class ServiceWorkerContextWrapper;
extern const char kPushSenderIdServiceWorkerKey[];
-extern const char kPushRegistrationIdServiceWorkerKey[];
+extern const char kPushSubscriptionIdServiceWorkerKey[];
class PushMessagingMessageFilter : public BrowserMessageFilter {
public:
@@ -33,7 +33,7 @@ class PushMessagingMessageFilter : public BrowserMessageFilter {
ServiceWorkerContextWrapper* service_worker_context);
private:
- struct RegisterData;
+ struct SubscribeData;
class Core;
friend class BrowserThread;
@@ -45,67 +45,67 @@ class PushMessagingMessageFilter : public BrowserMessageFilter {
void OnDestruct() const override;
bool OnMessageReceived(const IPC::Message& message) override;
- // Register methods on IO thread ---------------------------------------------
+ // Subscribe methods on IO thread --------------------------------------------
- void OnRegisterFromDocument(int render_frame_id,
- int request_id,
- const std::string& sender_id,
- bool user_visible,
- int64_t service_worker_registration_id);
+ void OnSubscribeFromDocument(int render_frame_id,
+ int request_id,
+ const std::string& sender_id,
+ bool user_visible,
+ int64_t service_worker_registration_id);
- void OnRegisterFromWorker(int request_id,
- int64_t service_worker_registration_id,
- bool user_visible);
+ void OnSubscribeFromWorker(int request_id,
+ int64_t service_worker_registration_id,
+ bool user_visible);
- void DidPersistSenderId(const RegisterData& data,
+ void DidPersistSenderId(const SubscribeData& data,
const std::string& sender_id,
ServiceWorkerStatusCode service_worker_status);
// sender_id is ignored if data.FromDocument() is false.
- void CheckForExistingRegistration(
- const RegisterData& data,
+ void CheckForExistingSubscription(
+ const SubscribeData& data,
const std::string& sender_id);
// sender_id is ignored if data.FromDocument() is false.
- void DidCheckForExistingRegistration(
- const RegisterData& data,
+ void DidCheckForExistingSubscription(
+ const SubscribeData& data,
const std::string& sender_id,
- const std::string& push_registration_id,
+ const std::string& push_subscription_id,
ServiceWorkerStatusCode service_worker_status);
- void DidGetSenderIdFromStorage(const RegisterData& data,
+ void DidGetSenderIdFromStorage(const SubscribeData& data,
const std::string& sender_id,
ServiceWorkerStatusCode service_worker_status);
// Called via PostTask from UI thread.
- void PersistRegistrationOnIO(const RegisterData& data,
- const std::string& push_registration_id);
+ void PersistSubscriptionOnIO(const SubscribeData& data,
+ const std::string& push_subscribe_id);
johnme 2015/05/07 13:31:25 Nit: "push_subscription_id"
- void DidPersistRegistrationOnIO(
- const RegisterData& data,
- const std::string& push_registration_id,
+ void DidPersistSubscriptionOnIO(
+ const SubscribeData& data,
+ const std::string& push_subscription_id,
ServiceWorkerStatusCode service_worker_status);
// Called both from IO thread, and via PostTask from UI thread.
- void SendRegisterError(const RegisterData& data,
- PushRegistrationStatus status);
+ void SendSubscribeError(const SubscribeData& data,
+ PushSubscriptionStatus status);
// Called both from IO thread, and via PostTask from UI thread.
- void SendRegisterSuccess(const RegisterData& data,
- PushRegistrationStatus status,
- const std::string& push_registration_id);
+ void SendSubscribeSuccess(const SubscribeData& data,
+ PushSubscriptionStatus status,
+ const std::string& push_subscription_id);
- // Unregister methods on IO thread -------------------------------------------
+ // Unsubscribe methods on IO thread ------------------------------------------
- void OnUnregister(int request_id, int64_t service_worker_registration_id);
+ void OnUnsubscribe(int request_id, int64_t service_worker_registration_id);
- void UnregisterHavingGottenPushRegistrationId(
+ void UnsubscribeHavingGottenPushSubscriptionId(
int request_id,
int64_t service_worker_registration_id,
const GURL& requesting_origin,
- const std::string& push_registration_id,
+ const std::string& push_subscription_id,
ServiceWorkerStatusCode service_worker_status);
- void UnregisterHavingGottenSenderId(
+ void UnsubscribeHavingGottenSenderId(
int request_id,
int64_t service_worker_registration_id,
const GURL& requesting_origin,
@@ -113,25 +113,25 @@ class PushMessagingMessageFilter : public BrowserMessageFilter {
ServiceWorkerStatusCode service_worker_status);
// Called via PostTask from UI thread.
- void ClearRegistrationData(int request_id,
+ void ClearSubscriptionData(int request_id,
int64_t service_worker_registration_id,
- PushUnregistrationStatus unregistration_status);
+ PushUnsubscriptionStatus unsubscription_status);
- void DidClearRegistrationData(int request_id,
- PushUnregistrationStatus unregistration_status,
+ void DidClearSubscriptionData(int request_id,
+ PushUnsubscriptionStatus unsubscription_status,
ServiceWorkerStatusCode service_worker_status);
// Called both from IO thread, and via PostTask from UI thread.
- void DidUnregister(int request_id,
- PushUnregistrationStatus unregistration_status);
+ void DidUnsubscribe(int request_id,
+ PushUnsubscriptionStatus unsubscribe_status);
- // GetRegistration methods on IO thread --------------------------------------
+ // GetSubscription methods on IO thread --------------------------------------
- void OnGetRegistration(int request_id,
+ void OnGetSubscription(int request_id,
int64_t service_worker_registration_id);
- void DidGetRegistration(int request_id,
- const std::string& push_registration_id,
+ void DidGetSubscription(int request_id,
+ const std::string& push_subscription_id,
ServiceWorkerStatusCode status);
// GetPermission methods on IO thread ----------------------------------------

Powered by Google App Engine
This is Rietveld 408576698