Push messaging: Move endpoint URL creation into PushMessagingServiceImpl
content::PushMessagingService is a "push service-agnostic interface that the Push API uses for talking to push messaging services like GCM." This change updates the PushMessagingService interface to improve compatibility with other push services by removing GetEndpoint(). The change also updates the PushMessagingService callbacks for subscribe() and getSubscription() to include the endpoint URL. The new callbacks provide the endpoint URL without using GetEndpoint(). Before this change, PushMessagingService::GetEndpoint() returned the absolute URL of the push service. content::PushMessagingManager created a subscription's endpoint URL by appending the subscription ID to the return value from PushMessagingService::GetEndpoint(). This scheme does not work for all push services. For example, Microsoft's push service may use a different domain for each subscription. Additionally, Microsoft's push service endpoints do not include the subscription ID. This change moves endpoint URL construction from endpoint URL construction from the content layer to the chrome layer enables Chromium embedders to replace GCM with another push service without updating the content layer. content: :PushMessagingManager to PushMessagingServiceImpl. Moving Change-Id: Ifb5ee1dc8455d1dcbc34c52c29bc40de7e97476a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1704989Reviewed-by:Avi Drissman <avi@chromium.org> Reviewed-by:
Peter Beverloo <peter@chromium.org> Commit-Queue: Steve Becker <stevebe@microsoft.com> Cr-Commit-Position: refs/heads/master@{#678443}
Showing
Please register or sign in to comment