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

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 exception failure return and updated more tests 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 11554e94baa11c1d8698777aae352b481c3e29b9..48563def2315f111044fa525d899ecab38720e2f 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"
Peter Beverloo 2016/02/26 16:02:33 nit: double include
harkness 2016/02/26 17:12:04 Done.
#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,20 @@ 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, user_visible) ==
+ if (GetPermissionStatus(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