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

Issue 7432006: Add an experimental permissions API for extensions. (Closed)

Created:
9 years, 5 months ago by jstritar
Modified:
9 years, 5 months ago
CC:
chromium-reviews, Erik does not do reviews, Paweł Hajdan Jr., kkania, Aaron Boodman, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Re-land the experimental permissions API for extensions. The permissions API lets extensions specify optional permissions in their manifest that they can request at run-time. It currently supports API permissions through a white-list. Host permissions will come later. This also fixes some clang errors from the previous attempt. BUG=48119, 70466, 84507 TEST=*Extension* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=94288 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=94326

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 51

Patch Set 4 : Make API experimental and address feedback #

Patch Set 5 : missed a scoped_refptr #

Total comments: 4

Patch Set 6 : feedback & fix tests #

Patch Set 7 : . #

Patch Set 8 : fix the browser_tests #

Patch Set 9 : . #

Patch Set 10 : fix clang #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4113 lines, -426 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 6 chunks +18 lines, -2 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/background/background_mode_manager.cc View 2 chunks +21 lines, -3 lines 0 comments Download
M chrome/browser/extensions/convert_web_app_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/convert_web_app_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_install_ui.h View 1 2 3 5 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_install_ui.cc View 5 chunks +30 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_management_api.cc View 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/browser/extensions/extension_permissions_api.h View 1 2 3 4 5 6 7 8 9 1 chunk +119 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_permissions_api.cc View 1 2 3 4 5 6 7 8 9 1 chunk +378 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_permissions_api_constants.h View 1 2 3 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_permissions_api_constants.cc View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.h View 1 2 3 4 5 6 7 8 9 2 chunks +22 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 5 6 7 8 9 8 chunks +105 lines, -66 lines 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +66 lines, -18 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 6 chunks +15 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 9 chunks +54 lines, -13 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 5 7 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/extensions/permissions_apitest.cc View 1 2 3 4 5 2 chunks +38 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc View 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_install_dialog_view.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/chrome_notification_types.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.json View 1 2 3 4 5 6 7 1 chunk +137 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/experimental.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A chrome/common/extensions/docs/experimental.permissions.html View 1 2 3 1 chunk +1784 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/samples.json View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 5 6 7 8 9 8 chunks +81 lines, -13 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 6 12 chunks +219 lines, -126 lines 0 comments Download
M chrome/common/extensions/extension_constants.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension_messages.h View 1 2 3 8 6 chunks +27 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_messages.cc View 1 2 3 4 5 6 7 8 6 chunks +46 lines, -6 lines 0 comments Download
M chrome/common/extensions/extension_permission_set.h View 1 2 3 6 chunks +23 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_permission_set.cc View 1 2 3 4 5 4 chunks +83 lines, -4 lines 0 comments Download
M chrome/common/extensions/extension_permission_set_unittest.cc View 1 2 3 4 5 39 chunks +249 lines, -88 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/common/extensions/url_pattern_set.h View 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/common/extensions/url_pattern_set.cc View 2 chunks +28 lines, -0 lines 0 comments Download
M chrome/common/extensions/url_pattern_set_unittest.cc View 1 chunk +159 lines, -52 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.cc View 8 5 chunks +17 lines, -1 line 0 comments Download
M chrome/renderer/resources/extension_apitest.js View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/resources/renderer_extension_bindings.js View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html View 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/permissions/optional/background.html View 1 2 3 1 chunk +188 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/permissions/optional/manifest.json View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/permissions/optional_deny/background.html View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/permissions/optional_deny/manifest.json View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
jstritar
Hi Mihai, I'm thinking of making this experimental before landing it (though its not experimental ...
9 years, 5 months ago (2011-07-19 17:07:27 UTC) #1
jstritar
http://codereview.chromium.org/7432006/diff/2002/chrome/common/extensions/extension.h File chrome/common/extensions/extension.h (right): http://codereview.chromium.org/7432006/diff/2002/chrome/common/extensions/extension.h#newcode705 chrome/common/extensions/extension.h:705: mutable RuntimeData runtime_data_; I kept this in Extension to ...
9 years, 5 months ago (2011-07-19 17:10:53 UTC) #2
jstritar
http://codereview.chromium.org/7432006/diff/2002/chrome/common/extensions/api/extension_api.json File chrome/common/extensions/api/extension_api.json (right): http://codereview.chromium.org/7432006/diff/2002/chrome/common/extensions/api/extension_api.json#newcode1151 chrome/common/extensions/api/extension_api.json:1151: "description": "Requests access to the specified permissions.", Mention the ...
9 years, 5 months ago (2011-07-19 17:15:13 UTC) #3
jstritar
+atwilson to review the background_mode_manager changes
9 years, 5 months ago (2011-07-20 19:41:25 UTC) #4
Mihai Parparita -not on Chrome
Here's what I have so far (have about 1/3 of the files left to go, ...
9 years, 5 months ago (2011-07-20 22:03:42 UTC) #5
jstritar
On 2011/07/20 22:03:42, Mihai Parparita wrote: > http://codereview.chromium.org/7432006/diff/2002/chrome/browser/extensions/extension_permissions_api_constants.cc#newcode9 > chrome/browser/extensions/extension_permissions_api_constants.cc:9: const char > kApisKey[] = ...
9 years, 5 months ago (2011-07-21 15:43:12 UTC) #6
Mihai Parparita -not on Chrome
On Thu, Jul 21, 2011 at 11:43 AM, <jstritar@chromium.org> wrote: > too: {names: ['tabs', 'management']}. ...
9 years, 5 months ago (2011-07-21 17:41:52 UTC) #7
jstritar
On Thu, Jul 21, 2011 at 1:41 PM, Mihai Parparita <mihaip@chromium.org>wrote: > On Thu, Jul ...
9 years, 5 months ago (2011-07-21 18:29:01 UTC) #8
Mihai Parparita -not on Chrome
On Thu, Jul 21, 2011 at 2:28 PM, Jon Stritar <jstritar@chromium.org> wrote: > This might ...
9 years, 5 months ago (2011-07-21 20:39:42 UTC) #9
Mihai Parparita -not on Chrome
http://codereview.chromium.org/7432006/diff/2002/chrome/browser/extensions/extension_permissions_api.cc File chrome/browser/extensions/extension_permissions_api.cc (right): http://codereview.chromium.org/7432006/diff/2002/chrome/browser/extensions/extension_permissions_api.cc#newcode102 chrome/browser/extensions/extension_permissions_api.cc:102: const ExtensionPermissionSet* existing = extension->GetActivePermissions(); I the type of ...
9 years, 5 months ago (2011-07-21 21:18:13 UTC) #10
jstritar
Back to you Mihai. It'd be great if you have time to review it before ...
9 years, 5 months ago (2011-07-22 19:21:55 UTC) #11
Mihai Parparita -not on Chrome
LGTM with some small issues, feel free to fix them and land this if you ...
9 years, 5 months ago (2011-07-23 22:54:52 UTC) #12
jstritar
Thanks for taking a look at it. I addressed your comments, and also realized that ...
9 years, 5 months ago (2011-07-25 19:15:23 UTC) #13
Mihai Parparita -not on Chrome
Still LGTM
9 years, 5 months ago (2011-07-25 19:55:30 UTC) #14
jstritar
Unfortunately I didn't make this in M14 due to a couple obscure IPC errors. I ...
9 years, 5 months ago (2011-07-26 15:31:20 UTC) #15
commit-bot: I haz the power
9 years, 5 months ago (2011-07-26 23:13:03 UTC) #16
Can't apply patch for file
chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html.
While running patch -p1 --forward --force;
patching file
chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html
Hunk #1 FAILED at 6.
1 out of 1 hunk FAILED -- saving rejects to file
chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html.rej

Powered by Google App Engine
This is Rietveld 408576698