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

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

Issue 1851423003: Make Web Push use InstanceID tokens instead of GCM registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid4default
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « content/shell/browser/layout_test/layout_test_push_messaging_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } else { 94 } else {
95 callback.Run("registration_id", std::vector<uint8_t>() /* p256dh */, 95 callback.Run("registration_id", std::vector<uint8_t>() /* p256dh */,
96 std::vector<uint8_t>() /* auth */, 96 std::vector<uint8_t>() /* auth */,
97 PUSH_REGISTRATION_STATUS_PERMISSION_DENIED); 97 PUSH_REGISTRATION_STATUS_PERMISSION_DENIED);
98 } 98 }
99 } 99 }
100 100
101 void LayoutTestPushMessagingService::GetEncryptionInfo( 101 void LayoutTestPushMessagingService::GetEncryptionInfo(
102 const GURL& origin, 102 const GURL& origin,
103 int64_t service_worker_registration_id, 103 int64_t service_worker_registration_id,
104 const std::string& sender_id,
104 const EncryptionInfoCallback& callback) { 105 const EncryptionInfoCallback& callback) {
105 std::vector<uint8_t> p256dh( 106 std::vector<uint8_t> p256dh(
106 kTestP256Key, kTestP256Key + arraysize(kTestP256Key)); 107 kTestP256Key, kTestP256Key + arraysize(kTestP256Key));
107 std::vector<uint8_t> auth( 108 std::vector<uint8_t> auth(
108 kAuthentication, kAuthentication + arraysize(kAuthentication)); 109 kAuthentication, kAuthentication + arraysize(kAuthentication));
109 110
110 callback.Run(true /* success */, p256dh, auth); 111 callback.Run(true /* success */, p256dh, auth);
111 } 112 }
112 113
113 blink::WebPushPermissionStatus 114 blink::WebPushPermissionStatus
(...skipping 11 matching lines...) Expand all
125 126
126 void LayoutTestPushMessagingService::Unsubscribe( 127 void LayoutTestPushMessagingService::Unsubscribe(
127 const GURL& requesting_origin, 128 const GURL& requesting_origin,
128 int64_t service_worker_registration_id, 129 int64_t service_worker_registration_id,
129 const std::string& sender_id, 130 const std::string& sender_id,
130 const UnregisterCallback& callback) { 131 const UnregisterCallback& callback) {
131 callback.Run(PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED); 132 callback.Run(PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED);
132 } 133 }
133 134
134 } // namespace content 135 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_push_messaging_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698