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

Issue 1316863010: browser: implement multiple permission requesting (Closed)

Created:
5 years, 3 months ago by Lalit Maganti
Modified:
5 years, 1 month ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-permissions_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@request-multiple-content
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement browser side of multiple permissions request. This CL implements navigator.permissions.request() with multiple permissions on the browser side. This involves changing permission_service and permission_manager to store infomation about multiple requests and dispatch callbacks as appropriate. It also tries to reduce the amount of new code by attempting to unify the single and multiple codepaths in permission manager. Finally, it updates the test classes to match the interface updates. BUG=516626

Patch Set 1 #

Patch Set 2 : Rebase on renderer #

Patch Set 3 : Rebase on cancel CL #

Patch Set 4 : Fix subtle issues #

Patch Set 5 : Rebase on new cancel CL #

Patch Set 6 : Cut down on CL size #

Total comments: 14

Patch Set 7 : Address review comments #

Patch Set 8 : Rebase on cancel #

Patch Set 9 : Split single/multiple request code-paths #

Patch Set 10 : Account for push/notification issues #

Patch Set 11 : Fix comment #

Patch Set 12 : Fix compile errors #

Patch Set 13 : Fix issues #

Patch Set 14 : Fix compile #

Patch Set 15 : Address try failures #

Patch Set 16 : Address compile failures #

Patch Set 17 : Fix memory leak in permission_manager #

Total comments: 16

Patch Set 18 : Address review comments #

Patch Set 19 : Fix the build #

Patch Set 20 : Fix cast build #

Patch Set 21 : Fix other builds #

Patch Set 22 : Remove duplicate responses #

Patch Set 23 : Rebase on master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -163 lines) Patch
M android_webview/browser/aw_permission_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +8 lines, -4 lines 0 comments Download
M android_webview/browser/aw_permission_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +44 lines, -17 lines 0 comments Download
M chrome/browser/permissions/permission_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +16 lines, -7 lines 0 comments Download
M chrome/browser/permissions/permission_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +105 lines, -49 lines 0 comments Download
M chrome/browser/permissions/permission_request_id.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_request_id.cc View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
M chromecast/browser/cast_permission_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +8 lines, -4 lines 0 comments Download
M chromecast/browser/cast_permission_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +14 lines, -4 lines 0 comments Download
M content/browser/permissions/permission_service_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/browser/permissions/permission_service_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +5 lines, -5 lines 0 comments Download
M content/browser/permissions/permission_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +10 lines, -6 lines 0 comments Download
M content/browser/permissions/permission_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +86 lines, -42 lines 0 comments Download
M content/public/browser/permission_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +22 lines, -6 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_permission_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +8 lines, -4 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_permission_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +22 lines, -5 lines 0 comments Download
M content/shell/browser/shell_permission_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +8 lines, -4 lines 0 comments Download
M content/shell/browser/shell_permission_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +17 lines, -5 lines 0 comments Download

Messages

Total messages: 17 (4 generated)
Lalit Maganti
5 years, 3 months ago (2015-09-04 14:47:37 UTC) #2
mlamouri (slow - plz ping)
Could you move out the CancelPermissionRequest() out of this CL? I think it might be ...
5 years, 3 months ago (2015-09-08 10:11:20 UTC) #3
mlamouri (slow - plz ping)
It seems that this CL is not fully rebase. I had a look at everything ...
5 years, 3 months ago (2015-09-16 15:08:10 UTC) #6
Lalit Maganti
We need to discuss AwPermisisonManager and whether unifying the paths in service_impl is the correct ...
5 years, 3 months ago (2015-09-16 17:21:19 UTC) #7
mlamouri (slow - plz ping)
I have a few comments about the Chrome's PermissionManager implementation: - can you remove the ...
5 years, 3 months ago (2015-09-23 16:37:37 UTC) #8
michaelbai
https://codereview.chromium.org/1316863010/diff/360001/content/public/browser/permission_manager.h File content/public/browser/permission_manager.h (right): https://codereview.chromium.org/1316863010/diff/360001/content/public/browser/permission_manager.h#newcode55 content/public/browser/permission_manager.h:55: const std::vector<PermissionStatus>&)>& callback) = 0; Are you going to ...
5 years, 3 months ago (2015-09-23 17:51:52 UTC) #10
Lalit Maganti
https://codereview.chromium.org/1316863010/diff/360001/content/public/browser/permission_manager.h File content/public/browser/permission_manager.h (right): https://codereview.chromium.org/1316863010/diff/360001/content/public/browser/permission_manager.h#newcode55 content/public/browser/permission_manager.h:55: const std::vector<PermissionStatus>&)>& callback) = 0; On 2015/09/23 17:51:52, michaelbai ...
5 years, 3 months ago (2015-09-23 17:57:25 UTC) #11
Lalit Maganti
https://codereview.chromium.org/1316863010/diff/360001/android_webview/browser/aw_permission_manager.cc File android_webview/browser/aw_permission_manager.cc (right): https://codereview.chromium.org/1316863010/diff/360001/android_webview/browser/aw_permission_manager.cc#newcode244 android_webview/browser/aw_permission_manager.cc:244: return kNoPendingRequestOrSubscription; On 2015/09/23 16:37:37, Mounir Lamouri wrote: > ...
5 years, 3 months ago (2015-09-24 09:24:11 UTC) #12
mlamouri (slow - plz ping)
This CL is blocked by https://codereview.chromium.org/1342833002 so I will keep it aside.
5 years, 2 months ago (2015-09-28 14:06:22 UTC) #13
mlamouri (slow - plz ping)
I think this CL needs to be rebased on top of the CancelPermissionRequest() changes.
5 years, 2 months ago (2015-10-05 16:02:00 UTC) #14
mlamouri (slow - plz ping)
On 2015/10/05 at 16:02:00, Mounir Lamouri wrote: > I think this CL needs to be ...
5 years, 2 months ago (2015-10-23 13:58:13 UTC) #15
mlamouri (slow - plz ping)
On 2015/10/23 at 13:58:13, Mounir Lamouri wrote: > On 2015/10/05 at 16:02:00, Mounir Lamouri wrote: ...
5 years, 2 months ago (2015-10-24 06:30:25 UTC) #16
Lalit Maganti (personal)
5 years, 2 months ago (2015-10-24 07:18:42 UTC) #17
Message was sent while issue was closed.
On 2015/10/24 06:30:25, Mounir Lamouri wrote:
> On 2015/10/23 at 13:58:13, Mounir Lamouri wrote:
> > On 2015/10/05 at 16:02:00, Mounir Lamouri wrote:
> > > I think this CL needs to be rebased on top of the
CancelPermissionRequest()
> changes.
> > 
> > I sent a rebased and modified version of this CL here:
> https://codereview.chromium.org/1419083002
> 
> My CL above has landed. Closing this one.

Glad to see it in :)

I'm going to rebase my Infobar Manager one too so that some progress can be made
on Android as well.

Powered by Google App Engine
This is Rietveld 408576698