Index: chrome/browser/push_messaging/push_messaging_service_impl.h |
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.h b/chrome/browser/push_messaging/push_messaging_service_impl.h |
index 27001da91f201157a112559d018553f4569455ba..20f0db524450c74f0cf5cfdc652a378a46382a3b 100644 |
--- a/chrome/browser/push_messaging/push_messaging_service_impl.h |
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.h |
@@ -63,7 +63,7 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
// content::PushMessagingService implementation: |
GURL GetPushEndpoint() override; |
- void RegisterFromDocument( |
+ void SubscribeFromDocument( |
const GURL& requesting_origin, |
int64 service_worker_registration_id, |
const std::string& sender_id, |
@@ -71,13 +71,13 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
int render_frame_id, |
bool user_visible, |
const content::PushMessagingService::RegisterCallback& callback) override; |
- void RegisterFromWorker( |
+ void SubscribeFromWorker( |
const GURL& requesting_origin, |
int64 service_worker_registration_id, |
const std::string& sender_id, |
bool user_visible, |
const content::PushMessagingService::RegisterCallback& callback) override; |
- void Unregister( |
+ void Unsubscribe( |
const GURL& requesting_origin, |
int64 service_worker_registration_id, |
const std::string& sender_id, |
@@ -103,9 +103,9 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
const base::Closure& callback); |
private: |
- // A registration is pending until it has succeeded or failed. |
- void IncreasePushRegistrationCount(int add, bool is_pending); |
- void DecreasePushRegistrationCount(int subtract, bool was_pending); |
+ // A subscription is pending until it has succeeded or failed. |
+ void IncreasePushSubscriptionCount(int add, bool is_pending); |
+ void DecreasePushSubscriptionCount(int subtract, bool was_pending); |
// OnMessage methods --------------------------------------------------------- |
@@ -116,17 +116,17 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
const base::Closure& message_handled_closure, |
content::PushDeliveryStatus status); |
- // Register methods ---------------------------------------------------------- |
+ // Subscribe methods ---------------------------------------------------------- |
- void RegisterEnd( |
+ void SubscribeFail( |
Peter Beverloo
2015/05/18 12:44:36
I don't like this rename. We call this from the Di
Pranay
2015/05/19 04:40:39
Sorry, overlooked GCMClient::SUCCESS case in DidSu
|
const content::PushMessagingService::RegisterCallback& callback, |
- const std::string& registration_id, |
+ const std::string& subscription_id, |
content::PushRegistrationStatus status); |
- void DidRegister( |
+ void DidSubscribe( |
const PushMessagingAppIdentifier& app_identifier, |
const content::PushMessagingService::RegisterCallback& callback, |
- const std::string& registration_id, |
+ const std::string& subscription_id, |
gcm::GCMClient::Result result); |
void DidRequestPermission( |
@@ -135,19 +135,19 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
const content::PushMessagingService::RegisterCallback& callback, |
ContentSetting content_setting); |
- // Unregister methods -------------------------------------------------------- |
+ // Unsubscribe methods -------------------------------------------------------- |
- void Unregister(const std::string& app_id, |
+ void Unsubscribe(const std::string& app_id, |
const std::string& sender_id, |
Peter Beverloo
2015/05/18 12:44:36
nit: indentation +1
Pranay
2015/05/19 04:40:39
Done.
|
const content::PushMessagingService::UnregisterCallback&); |
- void DidUnregister(bool was_registered, |
+ void DidUnsubscribe(bool was_subscribed, |
const content::PushMessagingService::UnregisterCallback&, |
Peter Beverloo
2015/05/18 12:44:36
nit: indentation +1
Pranay
2015/05/19 04:40:39
Done.
|
gcm::GCMClient::Result result); |
// OnContentSettingChanged methods ------------------------------------------- |
- void UnregisterBecausePermissionRevoked( |
+ void UnsubscribeBecausePermissionRevoked( |
const PushMessagingAppIdentifier& app_identifier, |
const base::Closure& closure, |
const std::string& sender_id, |
@@ -163,8 +163,8 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
Profile* profile_; |
- int push_registration_count_; |
- int pending_push_registration_count_; |
+ int push_subscription_count_; |
+ int pending_push_subscription_count_; |
base::Closure message_callback_for_testing_; |
base::Closure content_setting_changed_callback_for_testing_; |