| 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 927da07baa35fd30984f680cc51c482e0198c973..515c3fe5cf0f487fec5a8b414c7564b260f06ba9 100644
|
| --- a/content/child/push_messaging/push_provider.cc
|
| +++ b/content/child/push_messaging/push_provider.cc
|
| @@ -26,7 +26,7 @@ int CurrentWorkerId() {
|
|
|
| // Returns the id of the given |service_worker_registration|, which
|
| // is only available on the implementation of the interface.
|
| -int64 GetServiceWorkerRegistrationId(
|
| +int64_t GetServiceWorkerRegistrationId(
|
| blink::WebServiceWorkerRegistration* service_worker_registration) {
|
| return static_cast<WebServiceWorkerRegistrationImpl*>(
|
| service_worker_registration)->registration_id();
|
| @@ -73,7 +73,7 @@ void PushProvider::subscribe(
|
| DCHECK(callbacks);
|
| int request_id = push_dispatcher_->GenerateRequestId(CurrentWorkerId());
|
| subscription_callbacks_.AddWithID(callbacks, request_id);
|
| - int64 service_worker_registration_id =
|
| + int64_t service_worker_registration_id =
|
| GetServiceWorkerRegistrationId(service_worker_registration);
|
| thread_safe_sender_->Send(new PushMessagingHostMsg_SubscribeFromWorker(
|
| request_id, service_worker_registration_id, options.userVisibleOnly));
|
| @@ -88,7 +88,7 @@ void PushProvider::unsubscribe(
|
| int request_id = push_dispatcher_->GenerateRequestId(CurrentWorkerId());
|
| unsubscribe_callbacks_.AddWithID(callbacks, request_id);
|
|
|
| - int64 service_worker_registration_id =
|
| + int64_t service_worker_registration_id =
|
| GetServiceWorkerRegistrationId(service_worker_registration);
|
| thread_safe_sender_->Send(new PushMessagingHostMsg_Unsubscribe(
|
| request_id, service_worker_registration_id));
|
| @@ -101,7 +101,7 @@ void PushProvider::getSubscription(
|
| DCHECK(callbacks);
|
| int request_id = push_dispatcher_->GenerateRequestId(CurrentWorkerId());
|
| subscription_callbacks_.AddWithID(callbacks, request_id);
|
| - int64 service_worker_registration_id =
|
| + int64_t service_worker_registration_id =
|
| GetServiceWorkerRegistrationId(service_worker_registration);
|
| thread_safe_sender_->Send(new PushMessagingHostMsg_GetRegistration(
|
| request_id, service_worker_registration_id));
|
| @@ -115,7 +115,7 @@ void PushProvider::getPermissionStatus(
|
| DCHECK(callbacks);
|
| int request_id = push_dispatcher_->GenerateRequestId(CurrentWorkerId());
|
| permission_status_callbacks_.AddWithID(callbacks, request_id);
|
| - int64 service_worker_registration_id =
|
| + int64_t service_worker_registration_id =
|
| GetServiceWorkerRegistrationId(service_worker_registration);
|
| thread_safe_sender_->Send(new PushMessagingHostMsg_GetPermissionStatus(
|
| request_id, service_worker_registration_id, options.userVisibleOnly));
|
| @@ -148,14 +148,15 @@ bool PushProvider::OnMessageReceived(const IPC::Message& message) {
|
|
|
| void PushProvider::OnSubscribeFromWorkerSuccess(
|
| int request_id,
|
| - const GURL& endpoint) {
|
| + const GURL& endpoint,
|
| + const std::vector<uint8_t>& curve25519dh) {
|
| blink::WebPushSubscriptionCallbacks* callbacks =
|
| subscription_callbacks_.Lookup(request_id);
|
| if (!callbacks)
|
| return;
|
|
|
| scoped_ptr<blink::WebPushSubscription> subscription(
|
| - new blink::WebPushSubscription(endpoint));
|
| + new blink::WebPushSubscription(endpoint, curve25519dh));
|
| callbacks->onSuccess(subscription.release());
|
|
|
| subscription_callbacks_.Remove(request_id);
|
| @@ -205,14 +206,15 @@ void PushProvider::OnUnsubscribeError(
|
|
|
| void PushProvider::OnGetRegistrationSuccess(
|
| int request_id,
|
| - const GURL& endpoint) {
|
| + const GURL& endpoint,
|
| + const std::vector<uint8_t>& curve25519dh) {
|
| blink::WebPushSubscriptionCallbacks* callbacks =
|
| subscription_callbacks_.Lookup(request_id);
|
| if (!callbacks)
|
| return;
|
|
|
| scoped_ptr<blink::WebPushSubscription> subscription(
|
| - new blink::WebPushSubscription(endpoint));
|
| + new blink::WebPushSubscription(endpoint, curve25519dh));
|
| callbacks->onSuccess(subscription.release());
|
|
|
| subscription_callbacks_.Remove(request_id);
|
|
|