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

Issue 2573573002: Switch PermissionStatus events to an observer model. (Closed)

Created:
4 years ago by Reilly Grant (use Gerrit)
Modified:
3 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, jam, mlamouri+watch-blink_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switch PermissionStatus events to an observer model. This change replaces the PermissionService::GetNextPermissionChange method with a PermissionObserver interface that more closely matches the permission subscription model that exists in the browser process as it is unnecessary for the client to throttle these low-frequency updates. This also makes it cheaper (1 message vs. 2) to send an update to the renderer. BUG=677774 Committed: https://crrev.com/86dfcea3340fe31e9b44123163b90501df9ffde8 Cr-Commit-Position: refs/heads/master@{#441491}

Patch Set 1 #

Patch Set 2 : Rebased. #

Total comments: 2

Patch Set 3 : Remove call to registerPreFinalizer(). #

Total comments: 10

Patch Set 4 : Addresses mlamouri@'s feedback. #

Patch Set 5 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+162 lines, -146 lines) Patch
M content/browser/permissions/permission_service_context.h View 3 chunks +19 lines, -1 line 0 comments Download
M content/browser/permissions/permission_service_context.cc View 1 2 3 3 chunks +77 lines, -3 lines 0 comments Download
M content/browser/permissions/permission_service_impl.h View 5 chunks +5 lines, -27 lines 0 comments Download
M content/browser/permissions/permission_service_impl.cc View 5 chunks +8 lines, -71 lines 0 comments Download
A third_party/WebKit/Source/modules/permissions/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/permissions/PermissionStatus.h View 1 2 3 5 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp View 1 2 3 4 4 chunks +31 lines, -32 lines 0 comments Download
M third_party/WebKit/public/platform/modules/permissions/permission.mojom View 1 2 3 2 chunks +11 lines, -9 lines 0 comments Download

Messages

Total messages: 43 (25 generated)
Reilly Grant (use Gerrit)
tsepez@, IPC security review. mlamouri@, general review.
4 years ago (2016-12-12 19:27:03 UTC) #3
Tom Sepez
mojom itself LGTM, but still obviously lotsa red bots.
4 years ago (2016-12-12 19:41:25 UTC) #7
Reilly Grant (use Gerrit)
Rebased.
4 years ago (2016-12-13 01:18:02 UTC) #8
mlamouri (slow - plz ping)
This was designed based on the constraints and recommendations from the mojo folks at the ...
4 years ago (2016-12-13 13:35:56 UTC) #14
Reilly Grant (use Gerrit)
On 2016/12/13 13:35:56, mlamouri wrote: > This was designed based on the constraints and recommendations ...
4 years ago (2016-12-13 16:50:53 UTC) #15
haraken
https://codereview.chromium.org/2573573002/diff/20001/third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp File third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp (right): https://codereview.chromium.org/2573573002/diff/20001/third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp#newcode44 third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp:44: ThreadState::current()->registerPreFinalizer(this); We removed this method. Now the registration is ...
4 years ago (2016-12-14 02:00:33 UTC) #17
blundell
Hi Reilly, Are you referring to the relatively recent chromium-mojo@ thread on push vs. pull ...
4 years ago (2016-12-14 10:11:20 UTC) #18
Reilly Grant (use Gerrit)
I've updated the description to clarify that these updates are low-frequency so there is no ...
4 years ago (2016-12-15 23:13:26 UTC) #21
haraken
On 2016/12/15 23:13:26, Reilly Grant wrote: > I've updated the description to clarify that these ...
4 years ago (2016-12-16 01:13:46 UTC) #22
blundell
Thanks! I agree that the switch to observer definitely fits the recommendations from that thread.
4 years ago (2016-12-16 13:35:10 UTC) #23
mlamouri (slow - plz ping)
lgtm with comments applied https://codereview.chromium.org/2573573002/diff/40001/content/browser/permissions/permission_service_context.cc File content/browser/permissions/permission_service_context.cc (right): https://codereview.chromium.org/2573573002/diff/40001/content/browser/permissions/permission_service_context.cc#newcode47 content/browser/permissions/permission_service_context.cc:47: int id_; What's `id_` initial ...
4 years ago (2016-12-19 13:37:46 UTC) #24
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2573573002/diff/40001/content/browser/permissions/permission_service_context.cc File content/browser/permissions/permission_service_context.cc (right): https://codereview.chromium.org/2573573002/diff/40001/content/browser/permissions/permission_service_context.cc#newcode47 content/browser/permissions/permission_service_context.cc:47: int id_; On 2016/12/19 13:37:45, mlamouri wrote: > What's ...
4 years ago (2016-12-19 22:23:59 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2573573002/80001
3 years, 11 months ago (2017-01-03 18:57:33 UTC) #33
Reilly Grant (use Gerrit)
3 years, 11 months ago (2017-01-03 19:03:57 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/363931)
3 years, 11 months ago (2017-01-03 21:46:28 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2573573002/80001
3 years, 11 months ago (2017-01-04 20:53:18 UTC) #38
commit-bot: I haz the power
Committed patchset #5 (id:80001)
3 years, 11 months ago (2017-01-04 22:28:28 UTC) #41
commit-bot: I haz the power
3 years, 11 months ago (2017-01-04 22:30:07 UTC) #43
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/86dfcea3340fe31e9b44123163b90501df9ffde8
Cr-Commit-Position: refs/heads/master@{#441491}

Powered by Google App Engine
This is Rietveld 408576698