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

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

Issue 2697793004: Push API: Validate storage before returning cached subscriptions (Closed)
Patch Set: Fix include Created 3 years, 9 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 569ac3aa8c113ada4fbdecd7424ea4f5a1fbda18..a956ceeb30a0fbfb8f62ae0034790b2d84e9267d 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
@@ -75,7 +75,7 @@ void LayoutTestPushMessagingService::SubscribeFromDocument(
int renderer_id,
int render_frame_id,
const PushSubscriptionOptions& options,
- const PushMessagingService::RegisterCallback& callback) {
+ const RegisterCallback& callback) {
SubscribeFromWorker(requesting_origin, service_worker_registration_id,
options, callback);
}
@@ -84,7 +84,7 @@ void LayoutTestPushMessagingService::SubscribeFromWorker(
const GURL& requesting_origin,
int64_t service_worker_registration_id,
const PushSubscriptionOptions& options,
- const PushMessagingService::RegisterCallback& callback) {
+ const RegisterCallback& callback) {
if (GetPermissionStatus(requesting_origin, options.user_visible_only) ==
blink::WebPushPermissionStatusGranted) {
std::vector<uint8_t> p256dh(
@@ -102,17 +102,18 @@ void LayoutTestPushMessagingService::SubscribeFromWorker(
}
}
-void LayoutTestPushMessagingService::GetEncryptionInfo(
+void LayoutTestPushMessagingService::GetSubscriptionInfo(
const GURL& origin,
int64_t service_worker_registration_id,
const std::string& sender_id,
- const EncryptionInfoCallback& callback) {
+ const std::string& subscription_id,
+ const SubscriptionInfoCallback& callback) {
std::vector<uint8_t> p256dh(
kTestP256Key, kTestP256Key + arraysize(kTestP256Key));
std::vector<uint8_t> auth(
kAuthentication, kAuthentication + arraysize(kAuthentication));
- callback.Run(true /* success */, p256dh, auth);
+ callback.Run(true /* is_valid */, p256dh, auth);
}
blink::WebPushPermissionStatus
@@ -129,6 +130,7 @@ bool LayoutTestPushMessagingService::SupportNonVisibleMessages() {
}
void LayoutTestPushMessagingService::Unsubscribe(
+ PushUnregistrationReason reason,
const GURL& requesting_origin,
int64_t service_worker_registration_id,
const std::string& sender_id,
« no previous file with comments | « content/shell/browser/layout_test/layout_test_push_messaging_service.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698