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

Side by Side Diff: content/shell/browser/layout_test/layout_test_push_messaging_service.cc

Issue 1876473002: Add a feature flag for enabling subscription restrictions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/browser/layout_test/layout_test_push_messaging_service.h " 5 #include "content/shell/browser/layout_test/layout_test_push_messaging_service.h "
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/public/browser/permission_type.h" 10 #include "content/public/browser/permission_type.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 } // anonymous namespace 56 } // anonymous namespace
57 57
58 LayoutTestPushMessagingService::LayoutTestPushMessagingService() { 58 LayoutTestPushMessagingService::LayoutTestPushMessagingService() {
59 } 59 }
60 60
61 LayoutTestPushMessagingService::~LayoutTestPushMessagingService() { 61 LayoutTestPushMessagingService::~LayoutTestPushMessagingService() {
62 } 62 }
63 63
64 GURL LayoutTestPushMessagingService::GetPushEndpoint() { 64 GURL LayoutTestPushMessagingService::GetEndpoint(bool standard_protocol) const {
65 return GURL("https://example.com/LayoutTestEndpoint"); 65 return GURL("https://example.com/LayoutTestEndpoint/");
66 } 66 }
67 67
68 void LayoutTestPushMessagingService::SubscribeFromDocument( 68 void LayoutTestPushMessagingService::SubscribeFromDocument(
69 const GURL& requesting_origin, 69 const GURL& requesting_origin,
70 int64_t service_worker_registration_id, 70 int64_t service_worker_registration_id,
71 int renderer_id, 71 int renderer_id,
72 int render_frame_id, 72 int render_frame_id,
73 const PushSubscriptionOptions& options, 73 const PushSubscriptionOptions& options,
74 const PushMessagingService::RegisterCallback& callback) { 74 const PushMessagingService::RegisterCallback& callback) {
75 SubscribeFromWorker(requesting_origin, service_worker_registration_id, 75 SubscribeFromWorker(requesting_origin, service_worker_registration_id,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 void LayoutTestPushMessagingService::Unsubscribe( 125 void LayoutTestPushMessagingService::Unsubscribe(
126 const GURL& requesting_origin, 126 const GURL& requesting_origin,
127 int64_t service_worker_registration_id, 127 int64_t service_worker_registration_id,
128 const std::string& sender_id, 128 const std::string& sender_id,
129 const UnregisterCallback& callback) { 129 const UnregisterCallback& callback) {
130 callback.Run(PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED); 130 callback.Run(PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED);
131 } 131 }
132 132
133 } // namespace content 133 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698