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 10382149: Refactor the various ways to control what users can do to extensions. (Closed)

Created:
8 years, 7 months ago by Pam (message me for reviews)
Modified:
8 years, 6 months ago
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, mihaip-chromium-reviews_chromium.org, sadrul, ben+watch_chromium.org, arv (Not doing code reviews), estade+watch_chromium.org
Visibility:
Public.

Description

Refactor the various ways to control what users can do to extensions. Add an ExtensionManagementPolicy class, held by the ExtensionService, that registers delegates and mediates questions about what can be done to extensions (install, uninstall, modify, etc.). Convert existing mechanisms to control extension operations, namely administrator policy black/whitelists and component extension requirements, to use this abstraction. In addition to cleaning up existing mechanisms, this will support the control managed mode needs to impose (in an upcoming patch). BUG=117987 TEST=covered by unit, browser, and api tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=140194

Patch Set 1 #

Patch Set 2 : Lint fixes #

Patch Set 3 : Updated checkout #

Patch Set 4 : The last patchset from the previous review (9694038) #

Patch Set 5 : Back to the current version (same as patchset 3) #

Patch Set 6 : Addressed Aaron's comments (see older review) #

Patch Set 7 : Updated checkout #

Patch Set 8 : Now with *all* the changed files #

Patch Set 9 : Fix build warning #

Patch Set 10 : Fixed provider registration #

Patch Set 11 : Fixed unit tests #

Patch Set 12 : #

Patch Set 13 : #

Total comments: 52

Patch Set 14 : #

Patch Set 15 : ChromeOS compile fix #

Patch Set 16 : ChromeOS compile fix 2 #

Patch Set 17 : Addressing comments from partial review #

Total comments: 7

Patch Set 18 : Updated checkout #

Total comments: 2

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : Sigh. Update checkout 2. #

Patch Set 22 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1238 lines, -115 lines) Patch
M chrome/app/generated_resources.grd View 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +38 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_model.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/extensions/extension_management_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +19 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extension_management_api_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_management_api_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_management_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +60 lines, -8 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +24 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +47 lines, -9 lines 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +67 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 8 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 11 chunks +154 lines, -10 lines 0 comments Download
M chrome/browser/extensions/extension_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/extensions/installed_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +14 lines, -7 lines 0 comments Download
A chrome/browser/extensions/management_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +112 lines, -0 lines 0 comments Download
A chrome/browser/extensions/management_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +90 lines, -0 lines 0 comments Download
A chrome/browser/extensions/management_policy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +177 lines, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/browser/extensions/test_management_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/browser/extensions/test_management_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +54 lines, -0 lines 0 comments Download
M chrome/browser/resources/extensions/extension_list.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/ash/app_list/extension_app_item.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/extensions/extension_settings_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/extensions/extension_settings_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +18 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/ntp/app_launcher_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +7 lines, -1 line 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -6 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_manifest_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -2 lines 0 comments Download
A chrome/test/data/extensions/api_test/management/management_policy/allowed.html View 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/management/management_policy/allowed.js View 4 1 chunk +75 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/management/management_policy/manifest.json View 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/management/management_policy/prohibited.html View 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/management/management_policy/prohibited.js View 1 2 3 4 5 6 7 8 9 1 chunk +78 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/management/uninstall_extension/background.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension2.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension3.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 26 (0 generated)
Pam (message me for reviews)
Lint fixes
8 years, 7 months ago (2012-05-14 19:18:56 UTC) #1
Pam (message me for reviews)
At long last, here is the refactoring to support letting managed mode also control whether ...
8 years, 7 months ago (2012-05-15 17:02:06 UTC) #2
Aaron Boodman
Whoops, I guess http://codereview.chromium.org/9694038/ was old, and I should have reviewed this one? Is there ...
8 years, 7 months ago (2012-05-17 22:44:00 UTC) #3
Pam (message me for reviews)
On 2012/05/17 22:44:00, Aaron Boodman wrote: > Whoops, I guess http://codereview.chromium.org/9694038/ was old, and I ...
8 years, 7 months ago (2012-05-18 10:00:15 UTC) #4
Pam (message me for reviews)
Here's the latest patch, ready for another look. I agreed with and implemented most of ...
8 years, 7 months ago (2012-05-18 20:59:50 UTC) #5
Pam (message me for reviews)
I've copied over your comments from the older review, to make it easier to see ...
8 years, 7 months ago (2012-05-22 12:51:06 UTC) #6
Aaron Boodman
http://codereview.chromium.org/10382149/diff/7116/chrome/browser/extensions/extension_context_menu_browsertest.cc File chrome/browser/extensions/extension_context_menu_browsertest.cc (right): http://codereview.chromium.org/10382149/diff/7116/chrome/browser/extensions/extension_context_menu_browsertest.cc#newcode522 chrome/browser/extensions/extension_context_menu_browsertest.cc:522: // We need an extension to pass to the ...
8 years, 7 months ago (2012-05-22 15:56:11 UTC) #7
Pam (message me for reviews)
Thanks for the review. Please take another look. There are a few ongoing discussions -- ...
8 years, 7 months ago (2012-05-23 15:00:58 UTC) #8
Aaron Boodman
Not completely done. The methods available on ManagementPolicy::Provider still seem a bit weird to me, ...
8 years, 7 months ago (2012-05-24 08:11:22 UTC) #9
Pam (message me for reviews)
All comments (so far) addressed. Looking forward to the rest. :) - Pam
8 years, 7 months ago (2012-05-24 14:46:35 UTC) #10
Pam (message me for reviews)
Any news here? Thanks, - Pam
8 years, 6 months ago (2012-05-28 21:21:08 UTC) #11
Aaron Boodman
LGTM, no need to wait for another review from me. But please do factor out ...
8 years, 6 months ago (2012-05-29 03:03:07 UTC) #12
Pam (message me for reviews)
Dear OWNERS, Please take a look at the applicable pieces as listed below. estade: extension_list.js; ...
8 years, 6 months ago (2012-05-30 17:42:20 UTC) #13
xiyuan
extension_app_item.cc LGTM
8 years, 6 months ago (2012-05-30 18:13:38 UTC) #14
Evan Stade
http://codereview.chromium.org/10382149/diff/42056/chrome/browser/resources/extensions/extension_list.js File chrome/browser/resources/extensions/extension_list.js (right): http://codereview.chromium.org/10382149/diff/42056/chrome/browser/resources/extensions/extension_list.js#newcode160 chrome/browser/resources/extensions/extension_list.js:160: !extension.mayModifySettings; .may-not-disable .optional-controls { display: none; } also I ...
8 years, 6 months ago (2012-05-30 21:20:01 UTC) #15
Evan Stade
lgtm with the above addressed (you can ignore the hiding question) On 2012/05/30 21:20:01, Evan ...
8 years, 6 months ago (2012-05-31 17:56:08 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pam@chromium.org/10382149/32032
8 years, 6 months ago (2012-06-01 18:29:51 UTC) #17
commit-bot: I haz the power
Try job failure for 10382149-32032 (retry) on linux_rel for step "browser_tests". It's a second try, ...
8 years, 6 months ago (2012-06-01 19:44:30 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pam@chromium.org/10382149/32032
8 years, 6 months ago (2012-06-01 19:46:39 UTC) #19
commit-bot: I haz the power
Try job failure for 10382149-32032 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 6 months ago (2012-06-01 21:56:18 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pam@chromium.org/10382149/32032
8 years, 6 months ago (2012-06-02 06:38:40 UTC) #21
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/extension_context_menu_browsertest.cc: While running patch -p0 --forward --force; patching file chrome/browser/extensions/extension_context_menu_browsertest.cc ...
8 years, 6 months ago (2012-06-02 06:39:08 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pam@chromium.org/10382149/77007
8 years, 6 months ago (2012-06-02 10:44:02 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pam@chromium.org/10382149/83007
8 years, 6 months ago (2012-06-02 11:16:14 UTC) #24
commit-bot: I haz the power
Change committed as 140194
8 years, 6 months ago (2012-06-02 13:14:18 UTC) #25
rniwa-cr
8 years, 6 months ago (2012-06-03 05:25:00 UTC) #26

Powered by Google App Engine
This is Rietveld 408576698