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

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

Issue 1133083002: Reject the permissionState promise with NotSupported Exception (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failing test Created 5 years, 7 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 "content/public/browser/permission_type.h" 9 #include "content/public/browser/permission_type.h"
10 #include "content/shell/browser/layout_test/layout_test_browser_context.h" 10 #include "content/shell/browser/layout_test/layout_test_browser_context.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const GURL& embedding_origin, 75 const GURL& embedding_origin,
76 bool user_visible) { 76 bool user_visible) {
77 return ToWebPushPermissionStatus(LayoutTestContentBrowserClient::Get() 77 return ToWebPushPermissionStatus(LayoutTestContentBrowserClient::Get()
78 ->GetLayoutTestBrowserContext() 78 ->GetLayoutTestBrowserContext()
79 ->GetLayoutTestPermissionManager() 79 ->GetLayoutTestPermissionManager()
80 ->GetPermissionStatus(PermissionType::PUSH_MESSAGING, 80 ->GetPermissionStatus(PermissionType::PUSH_MESSAGING,
81 requesting_origin, 81 requesting_origin,
82 embedding_origin)); 82 embedding_origin));
83 } 83 }
84 84
85 bool LayoutTestPushMessagingService::SupportNonVisibleMessages() {
86 return false;
87 }
88
85 void LayoutTestPushMessagingService::Unregister( 89 void LayoutTestPushMessagingService::Unregister(
86 const GURL& requesting_origin, 90 const GURL& requesting_origin,
87 int64 service_worker_registration_id, 91 int64 service_worker_registration_id,
88 const std::string& sender_id, 92 const std::string& sender_id,
89 const UnregisterCallback& callback) { 93 const UnregisterCallback& callback) {
90 callback.Run(PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED); 94 callback.Run(PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED);
91 } 95 }
92 96
93 } // namespace content 97 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698