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

Unified Diff: content/shell/browser/layout_test/layout_test_push_messaging_service.cc

Issue 1129833003: Rename "register" -> "subscribe" in the Push Messaging code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@p-userVisible-tests
Patch Set: Created 5 years, 7 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
Index: content/shell/browser/layout_test/layout_test_push_messaging_service.cc
diff --git a/content/shell/browser/layout_test/layout_test_push_messaging_service.cc b/content/shell/browser/layout_test/layout_test_push_messaging_service.cc
index 5f0b0ec6edbce31b8cc541a36ddfa100da77c796..3922ee55da0112d8ec287bc36c21b84ab21241c5 100644
--- a/content/shell/browser/layout_test/layout_test_push_messaging_service.cc
+++ b/content/shell/browser/layout_test/layout_test_push_messaging_service.cc
@@ -42,30 +42,30 @@ GURL LayoutTestPushMessagingService::GetPushEndpoint() {
return GURL("https://example.com/LayoutTestEndpoint");
}
-void LayoutTestPushMessagingService::RegisterFromDocument(
+void LayoutTestPushMessagingService::SubscribeFromDocument(
const GURL& requesting_origin,
int64 service_worker_registration_id,
const std::string& sender_id,
int renderer_id,
int render_frame_id,
bool user_visible,
- const PushMessagingService::RegisterCallback& callback) {
- RegisterFromWorker(requesting_origin, service_worker_registration_id,
- sender_id, user_visible, callback);
+ const PushMessagingService::SubscribeCallback& callback) {
+ SubscribeFromWorker(requesting_origin, service_worker_registration_id,
+ sender_id, user_visible, callback);
}
-void LayoutTestPushMessagingService::RegisterFromWorker(
+void LayoutTestPushMessagingService::SubscribeFromWorker(
const GURL& requesting_origin,
int64 service_worker_registration_id,
const std::string& sender_id,
bool user_visible,
- const PushMessagingService::RegisterCallback& callback) {
+ const PushMessagingService::SubscribeCallback& callback) {
if (GetPermissionStatus(requesting_origin, requesting_origin, user_visible) ==
blink::WebPushPermissionStatusGranted) {
callback.Run("layoutTestRegistrationId",
- PUSH_REGISTRATION_STATUS_SUCCESS_FROM_PUSH_SERVICE);
+ PUSH_SUBSCRIPTION_STATUS_SUCCESS_FROM_PUSH_SERVICE);
} else {
- callback.Run("registration_id", PUSH_REGISTRATION_STATUS_PERMISSION_DENIED);
+ callback.Run("registration_id", PUSH_SUBSCRIPTION_STATUS_PERMISSION_DENIED);
}
}
@@ -82,12 +82,12 @@ LayoutTestPushMessagingService::GetPermissionStatus(
embedding_origin));
}
-void LayoutTestPushMessagingService::Unregister(
+void LayoutTestPushMessagingService::Unsubscribe(
const GURL& requesting_origin,
int64 service_worker_registration_id,
const std::string& sender_id,
- const UnregisterCallback& callback) {
- callback.Run(PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED);
+ const UnsubscribeCallback& callback) {
+ callback.Run(PUSH_UNSUBSCRIPTION_STATUS_SUCCESS_UNSUBSCRIBED);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698