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

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

Issue 1701313002: Partial implementation of subscription restrictions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added testing and integrated previous comments. Created 4 years, 10 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 e4a9e680157d9405b044d3179c40a605e03a6c4f..d232557049d2727be7376082b2fe83f8f0814ce3 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
@@ -8,6 +8,8 @@
#include "base/logging.h"
#include "base/macros.h"
#include "content/public/browser/permission_type.h"
+#include "content/public/common/push_subscription_options.h"
+#include "content/public/common/push_subscription_options.h"
#include "content/shell/browser/layout_test/layout_test_browser_context.h"
#include "content/shell/browser/layout_test/layout_test_content_browser_client.h"
#include "content/shell/browser/layout_test/layout_test_permission_manager.h"
@@ -67,22 +69,21 @@ GURL LayoutTestPushMessagingService::GetPushEndpoint() {
void LayoutTestPushMessagingService::SubscribeFromDocument(
const GURL& requesting_origin,
int64_t service_worker_registration_id,
- const std::string& sender_id,
int renderer_id,
int render_frame_id,
- bool user_visible,
+ const PushSubscriptionOptions& options,
const PushMessagingService::RegisterCallback& callback) {
SubscribeFromWorker(requesting_origin, service_worker_registration_id,
- sender_id, user_visible, callback);
+ options, callback);
}
void LayoutTestPushMessagingService::SubscribeFromWorker(
const GURL& requesting_origin,
int64_t service_worker_registration_id,
- const std::string& sender_id,
- bool user_visible,
+ const PushSubscriptionOptions& options,
const PushMessagingService::RegisterCallback& callback) {
- if (GetPermissionStatus(requesting_origin, requesting_origin, user_visible) ==
+ if (GetPermissionStatus(requesting_origin, requesting_origin,
+ options.user_visible_only) ==
blink::WebPushPermissionStatusGranted) {
std::vector<uint8_t> p256dh(
kTestP256Key, kTestP256Key + arraysize(kTestP256Key));

Powered by Google App Engine
This is Rietveld 408576698