Chromium Code Reviews| Index: content/child/push_messaging/push_provider.cc |
| diff --git a/content/child/push_messaging/push_provider.cc b/content/child/push_messaging/push_provider.cc |
| index 40741eb2371d9d9eb8e658c27c62bc49e1310451..01b6cd457617de078248f304b0ef6ee0a4dddc39 100644 |
| --- a/content/child/push_messaging/push_provider.cc |
| +++ b/content/child/push_messaging/push_provider.cc |
| @@ -75,7 +75,7 @@ void PushProvider::subscribe( |
| subscription_callbacks_.AddWithID(callbacks, request_id); |
| int64 service_worker_registration_id = |
| GetServiceWorkerRegistrationId(service_worker_registration); |
| - thread_safe_sender_->Send(new PushMessagingHostMsg_RegisterFromWorker( |
| + thread_safe_sender_->Send(new PushMessagingHostMsg_SubscribeFromWorker( |
| request_id, service_worker_registration_id, options.userVisibleOnly)); |
| } |
| @@ -90,7 +90,7 @@ void PushProvider::unsubscribe( |
| int64 service_worker_registration_id = |
| GetServiceWorkerRegistrationId(service_worker_registration); |
| - thread_safe_sender_->Send(new PushMessagingHostMsg_Unregister( |
| + thread_safe_sender_->Send(new PushMessagingHostMsg_Unsubscribe( |
| request_id, service_worker_registration_id)); |
| } |
| @@ -124,14 +124,14 @@ void PushProvider::getPermissionStatus( |
| bool PushProvider::OnMessageReceived(const IPC::Message& message) { |
| bool handled = true; |
| IPC_BEGIN_MESSAGE_MAP(PushProvider, message) |
| - IPC_MESSAGE_HANDLER(PushMessagingMsg_RegisterFromWorkerSuccess, |
| - OnRegisterFromWorkerSuccess); |
| - IPC_MESSAGE_HANDLER(PushMessagingMsg_RegisterFromWorkerError, |
| - OnRegisterFromWorkerError); |
| - IPC_MESSAGE_HANDLER(PushMessagingMsg_UnregisterSuccess, |
| - OnUnregisterSuccess); |
| - IPC_MESSAGE_HANDLER(PushMessagingMsg_UnregisterError, |
| - OnUnregisterError); |
| + IPC_MESSAGE_HANDLER(PushMessagingMsg_SubscribeFromWorkerSuccess, |
| + OnSubscribeFromWorkerSuccess); |
| + IPC_MESSAGE_HANDLER(PushMessagingMsg_SubscribeFromWorkerError, |
| + OnSubscribeFromWorkerError); |
| + IPC_MESSAGE_HANDLER(PushMessagingMsg_UnsubscribeSuccess, |
| + OnUnsubscribeSuccess); |
| + IPC_MESSAGE_HANDLER(PushMessagingMsg_UnsubscribeError, |
| + OnUnsubscribeError); |
| IPC_MESSAGE_HANDLER(PushMessagingMsg_GetRegistrationSuccess, |
| OnGetRegistrationSuccess); |
| IPC_MESSAGE_HANDLER(PushMessagingMsg_GetRegistrationError, |
| @@ -146,7 +146,7 @@ bool PushProvider::OnMessageReceived(const IPC::Message& message) { |
| return handled; |
| } |
| -void PushProvider::OnRegisterFromWorkerSuccess( |
| +void PushProvider::OnSubscribeFromWorkerSuccess( |
| int request_id, |
| const GURL& endpoint, |
| const std::string& registration_id) { |
| @@ -164,7 +164,7 @@ void PushProvider::OnRegisterFromWorkerSuccess( |
| subscription_callbacks_.Remove(request_id); |
| } |
| -void PushProvider::OnRegisterFromWorkerError(int request_id, |
| +void PushProvider::OnSubscribeFromWorkerError(int request_id, |
| PushRegistrationStatus status) { |
|
Peter Beverloo
2015/05/18 12:44:37
nit: indentation +1
Pranay
2015/05/19 04:40:39
Done.
|
| blink::WebPushSubscriptionCallbacks* callbacks = |
| subscription_callbacks_.Lookup(request_id); |
| @@ -179,18 +179,18 @@ void PushProvider::OnRegisterFromWorkerError(int request_id, |
| subscription_callbacks_.Remove(request_id); |
| } |
| -void PushProvider::OnUnregisterSuccess(int request_id, bool did_unregister) { |
| +void PushProvider::OnUnsubscribeSuccess(int request_id, bool did_unsubscribe) { |
| blink::WebPushUnsubscribeCallbacks* callbacks = |
| unsubscribe_callbacks_.Lookup(request_id); |
| if (!callbacks) |
| return; |
| - callbacks->onSuccess(&did_unregister); |
| + callbacks->onSuccess(&did_unsubscribe); |
| unsubscribe_callbacks_.Remove(request_id); |
| } |
| -void PushProvider::OnUnregisterError( |
| +void PushProvider::OnUnsubscribeError( |
| int request_id, |
| blink::WebPushError::ErrorType error_type, |
| const std::string& error_message) { |