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

Unified Diff: Source/modules/push_messaging/PushSubscriptionCallbacks.cpp

Issue 841333002: Push API: rename registration to subscription. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use https in the spec link. Created 5 years, 11 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
« no previous file with comments | « Source/modules/push_messaging/PushSubscriptionCallbacks.h ('k') | public/platform/WebPushClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/push_messaging/PushSubscriptionCallbacks.cpp
diff --git a/Source/modules/push_messaging/PushRegistrationCallbacks.cpp b/Source/modules/push_messaging/PushSubscriptionCallbacks.cpp
similarity index 60%
rename from Source/modules/push_messaging/PushRegistrationCallbacks.cpp
rename to Source/modules/push_messaging/PushSubscriptionCallbacks.cpp
index 976080761b3c32f28989125db648eebf11b32705..9e64505a8705c78640a5325f5ee9c0abf527e67d 100644
--- a/Source/modules/push_messaging/PushRegistrationCallbacks.cpp
+++ b/Source/modules/push_messaging/PushSubscriptionCallbacks.cpp
@@ -3,42 +3,42 @@
// found in the LICENSE file.
#include "config.h"
-#include "modules/push_messaging/PushRegistrationCallbacks.h"
+#include "modules/push_messaging/PushSubscriptionCallbacks.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "modules/push_messaging/PushError.h"
-#include "modules/push_messaging/PushRegistration.h"
+#include "modules/push_messaging/PushSubscription.h"
#include "modules/serviceworkers/ServiceWorkerRegistration.h"
namespace blink {
-PushRegistrationCallbacks::PushRegistrationCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResolver> resolver, ServiceWorkerRegistration* registration)
+PushSubscriptionCallbacks::PushSubscriptionCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResolver> resolver, ServiceWorkerRegistration* serviceWorkerRegistration)
: m_resolver(resolver)
- , m_serviceWorkerRegistration(registration)
+ , m_serviceWorkerRegistration(serviceWorkerRegistration)
{
ASSERT(m_resolver);
ASSERT(m_serviceWorkerRegistration);
}
-PushRegistrationCallbacks::~PushRegistrationCallbacks()
+PushSubscriptionCallbacks::~PushSubscriptionCallbacks()
{
}
-void PushRegistrationCallbacks::onSuccess(WebPushRegistration* webPushRegistration)
+void PushSubscriptionCallbacks::onSuccess(WebPushSubscription* webPushSubscription)
{
if (!m_resolver->executionContext() || m_resolver->executionContext()->activeDOMObjectsAreStopped()) {
- PushRegistration::dispose(webPushRegistration);
+ PushSubscription::dispose(webPushSubscription);
return;
}
- if (!webPushRegistration) {
+ if (!webPushSubscription) {
m_resolver->resolve(v8::Null(m_resolver->scriptState()->isolate()));
return;
}
- m_resolver->resolve(PushRegistration::take(m_resolver.get(), webPushRegistration, m_serviceWorkerRegistration));
+ m_resolver->resolve(PushSubscription::take(m_resolver.get(), webPushSubscription, m_serviceWorkerRegistration));
}
-void PushRegistrationCallbacks::onError(WebPushError* error)
+void PushSubscriptionCallbacks::onError(WebPushError* error)
{
if (!m_resolver->executionContext() || m_resolver->executionContext()->activeDOMObjectsAreStopped()) {
PushError::dispose(error);
« no previous file with comments | « Source/modules/push_messaging/PushSubscriptionCallbacks.h ('k') | public/platform/WebPushClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698