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

Issue 1349613003: [Extensions] Un-refcount PermissionSet (Closed)

Created:
5 years, 3 months ago by Devlin
Modified:
5 years, 3 months ago
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Un-refcount PermissionSet PermissionSet represents a set of permissions, and for some reason, it's been refcounted. There's really no reason to have it, and it makes everything more costly and difficult to reason about. Remove the refcounting. Note: This is part 1 of a 2-part series. This removes the ref-counting. In a followup, I'll go through and update many of the places that use const PermissionSet* and convert to const &. BUG=455414 TBR=thestig@chromium.org (misc chrome files with ptr conversion) TBR=nasko@chromium.org (extension messages - not actually changing any IPC messages) Committed: https://crrev.com/e2d0fd0ad14bfd0cd82e0093b1488103af532c8e Cr-Commit-Position: refs/heads/master@{#350684}

Patch Set 1 : #

Total comments: 29

Patch Set 2 : Ben's #

Patch Set 3 : format #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+773 lines, -751 lines) Patch
M chrome/browser/background/background_application_list_model.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/background/background_application_list_model.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/background/background_application_list_model_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/background/background_mode_manager.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/active_script_controller.cc View 3 chunks +6 lines, -10 lines 0 comments Download
M chrome/browser/extensions/active_tab_permission_granter.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/developer_private/extension_info_generator.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/permissions/permissions_api.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/permissions/permissions_api.cc View 8 chunks +14 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/permissions/permissions_api_helpers.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/permissions/permissions_api_helpers.cc View 3 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/permissions/permissions_api_helpers_unittest.cc View 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/permissions/permissions_apitest.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/bundle_installer.cc View 1 2 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/extensions/crx_installer_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_install_prompt.h View 4 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_install_prompt.cc View 6 chunks +17 lines, -15 lines 0 comments Download
M chrome/browser/extensions/extension_install_prompt_unittest.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_management.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_management.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 9 chunks +45 lines, -39 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 13 chunks +26 lines, -28 lines 0 comments Download
M chrome/browser/extensions/permission_messages_unittest.cc View 1 chunk +10 lines, -12 lines 0 comments Download
M chrome/browser/extensions/permissions_based_management_policy_provider.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/permissions_updater.h View 5 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/extensions/permissions_updater.cc View 11 chunks +110 lines, -106 lines 0 comments Download
M chrome/browser/extensions/permissions_updater_unittest.cc View 7 chunks +40 lines, -41 lines 0 comments Download
M chrome/browser/extensions/unpacked_installer.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/themes/theme_syncable_service_unittest.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc View 1 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/common/extensions/permissions/chrome_permission_message_provider_unittest.cc View 1 2 3 1 chunk +8 lines, -10 lines 0 comments Download
M chrome/common/extensions/permissions/permission_set_unittest.cc View 40 chunks +161 lines, -180 lines 0 comments Download
M chrome/common/extensions/permissions/permissions_data_unittest.cc View 7 chunks +19 lines, -26 lines 0 comments Download
M chrome/common/extensions/permissions/settings_override_permission_unittest.cc View 5 chunks +10 lines, -10 lines 0 comments Download
M extensions/browser/extension_prefs.h View 3 chunks +3 lines, -3 lines 0 comments Download
M extensions/browser/extension_prefs.cc View 5 chunks +10 lines, -10 lines 0 comments Download
M extensions/common/extension.h View 1 1 chunk +4 lines, -5 lines 0 comments Download
M extensions/common/extension.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M extensions/common/extension_messages.h View 1 chunk +1 line, -1 line 0 comments Download
M extensions/common/extension_messages.cc View 3 chunks +6 lines, -7 lines 0 comments Download
M extensions/common/manifest_handlers/permissions_parser.h View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/manifest_handlers/permissions_parser.cc View 3 chunks +20 lines, -20 lines 0 comments Download
M extensions/common/permissions/permission_set.h View 1 4 chunks +15 lines, -12 lines 0 comments Download
M extensions/common/permissions/permission_set.cc View 1 2 3 6 chunks +22 lines, -10 lines 0 comments Download
M extensions/common/permissions/permissions_data.h View 1 7 chunks +43 lines, -22 lines 0 comments Download
M extensions/common/permissions/permissions_data.cc View 1 2 11 chunks +94 lines, -78 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 3 chunks +6 lines, -7 lines 0 comments Download
M extensions/renderer/extension_injection_host.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 20 (9 generated)
Devlin
IT PASSES TRYBOT. A few notes: - Please hold off on any comments about replacing ...
5 years, 3 months ago (2015-09-21 20:48:17 UTC) #7
not at google - send to devlin
Gnarly. A couple of comments. https://codereview.chromium.org/1349613003/diff/80001/chrome/browser/extensions/api/permissions/permissions_api_helpers.h File chrome/browser/extensions/api/permissions/permissions_api_helpers.h (right): https://codereview.chromium.org/1349613003/diff/80001/chrome/browser/extensions/api/permissions/permissions_api_helpers.h#newcode30 chrome/browser/extensions/api/permissions/permissions_api_helpers.h:30: const PermissionSet* set); (noting ...
5 years, 3 months ago (2015-09-22 21:51:27 UTC) #8
Devlin
No code changes, just replying to two comments. https://codereview.chromium.org/1349613003/diff/80001/extensions/common/permissions/permissions_data.cc File extensions/common/permissions/permissions_data.cc (right): https://codereview.chromium.org/1349613003/diff/80001/extensions/common/permissions/permissions_data.cc#newcode310 extensions/common/permissions/permissions_data.cc:310: return ...
5 years, 3 months ago (2015-09-22 22:08:45 UTC) #9
not at google - send to devlin
https://codereview.chromium.org/1349613003/diff/80001/extensions/common/permissions/permissions_data.h File extensions/common/permissions/permissions_data.h (right): https://codereview.chromium.org/1349613003/diff/80001/extensions/common/permissions/permissions_data.h#newcode36 extensions/common/permissions/permissions_data.h:36: // only be set (or updated) on the thread ...
5 years, 3 months ago (2015-09-22 22:32:58 UTC) #10
Devlin
On 2015/09/22 22:32:58, kalman wrote: > https://codereview.chromium.org/1349613003/diff/80001/extensions/common/permissions/permissions_data.h > File extensions/common/permissions/permissions_data.h (right): > > https://codereview.chromium.org/1349613003/diff/80001/extensions/common/permissions/permissions_data.h#newcode36 > ...
5 years, 3 months ago (2015-09-23 16:52:22 UTC) #11
Devlin
https://codereview.chromium.org/1349613003/diff/80001/extensions/common/permissions/permission_set.cc File extensions/common/permissions/permission_set.cc (right): https://codereview.chromium.org/1349613003/diff/80001/extensions/common/permissions/permission_set.cc#newcode125 extensions/common/permissions/permission_set.cc:125: explicit_hosts_, scriptable_hosts_)); On 2015/09/22 21:51:26, kalman wrote: > It ...
5 years, 3 months ago (2015-09-23 17:09:00 UTC) #12
not at google - send to devlin
> That said, if you take a step back, it's not totally unheard of. It's ...
5 years, 3 months ago (2015-09-23 18:30:20 UTC) #13
not at google - send to devlin
lgtm
5 years, 3 months ago (2015-09-23 20:24:19 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1349613003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1349613003/140001
5 years, 3 months ago (2015-09-24 22:17:04 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:140001)
5 years, 3 months ago (2015-09-24 22:35:59 UTC) #19
commit-bot: I haz the power
5 years, 3 months ago (2015-09-24 22:36:45 UTC) #20
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e2d0fd0ad14bfd0cd82e0093b1488103af532c8e
Cr-Commit-Position: refs/heads/master@{#350684}

Powered by Google App Engine
This is Rietveld 408576698