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

Side by Side Diff: content/browser/permissions/permission_service_impl.cc

Issue 758603002: Use Mojo Permission Service when requesting Notifications permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_geolocation_follow_up
Patch Set: fixes to pass tests Created 6 years 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/browser/permissions/permission_service_impl.h" 5 #include "content/browser/permissions/permission_service_impl.h"
6 6
7 #include "content/public/browser/content_browser_client.h" 7 #include "content/public/browser/content_browser_client.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 namespace { 11 namespace {
12 12
13 PermissionType PermissionNameToPermissionType(PermissionName name) { 13 PermissionType PermissionNameToPermissionType(PermissionName name) {
14 switch(name) { 14 switch(name) {
15 case PERMISSION_NAME_GEOLOCATION: 15 case PERMISSION_NAME_GEOLOCATION:
16 return PERMISSION_GEOLOCATION; 16 return PERMISSION_GEOLOCATION;
17 case PERMISSION_NAME_MIDI_SYSEX: 17 case PERMISSION_NAME_MIDI_SYSEX:
18 return PERMISSION_MIDI_SYSEX; 18 return PERMISSION_MIDI_SYSEX;
19 case PERMISSION_NAME_NOTIFICATIONS:
20 return PERMISSION_NOTIFICATIONS;
19 } 21 }
20 22
21 NOTREACHED(); 23 NOTREACHED();
22 return PERMISSION_NUM; 24 return PERMISSION_NUM;
23 } 25 }
24 26
25 } // anonymous namespace 27 } // anonymous namespace
26 28
27 PermissionServiceImpl::PendingRequest::PendingRequest(PermissionType permission, 29 PermissionServiceImpl::PendingRequest::PendingRequest(PermissionType permission,
28 const GURL& origin) 30 const GURL& origin)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 106 }
105 107
106 void PermissionServiceImpl::HasPermission( 108 void PermissionServiceImpl::HasPermission(
107 PermissionName permission, 109 PermissionName permission,
108 const mojo::String& origin, 110 const mojo::String& origin,
109 const mojo::Callback<void(PermissionStatus)>& callback) { 111 const mojo::Callback<void(PermissionStatus)>& callback) {
110 NOTIMPLEMENTED(); 112 NOTIMPLEMENTED();
111 } 113 }
112 114
113 } // namespace content 115 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/child/notifications/notification_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698