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

Issue 714133002: Add more management policy checking after extension installed (Closed)

Created:
6 years, 1 month ago by binjin
Modified:
6 years, 1 month ago
CC:
chromium-reviews, vandebo (ex-Chrome), extensions-reviews_chromium.org, Lei Zhang, tommycli, Greg Billock, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add more management policy checking after extension installed This CL adds checking for MustRemainDisabled() from management policy after an extension is installed or updated, so that extensions supposed to be disabled will be disabled initially with proper disabled reason set. This CL also assumes that all disabled extension comes with proper disabled reason, so there are additional changes to ensure this. 1) Another extension disabled reason DISABLE_EXTERNAL_EXTENSION is added for external extensions. These extensions will be disabled initially on windows for user prompting. 2) Two tests from extension_disabled_ui_browsertest.cc is removed since these two tests are meant for legacy disables with not disabled reason set in user pref, which should be rarely seen now. And these rare cases are handled by presuming it's disabled by user action as well. BUG=None Committed: https://crrev.com/47947f841e18fa93ff2ec76ab731a57965dc98ec Cr-Commit-Position: refs/heads/master@{#304587}

Patch Set 1 #

Patch Set 2 : fix CrOS compile #

Total comments: 10

Patch Set 3 : simplify #

Patch Set 4 : add new comment #

Total comments: 7

Patch Set 5 : fixes addressing #13 (comments only) #

Patch Set 6 : fixes addressing #19 #

Total comments: 2

Patch Set 7 : fixes addressing #21 #

Patch Set 8 : fix reason last #

Total comments: 2

Patch Set 9 : fixes addressing #25 #

Patch Set 10 : minor fix #

Total comments: 6

Patch Set 11 : fixes addressing #27 #

Patch Set 12 : oops #

Patch Set 13 : remove two tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -71 lines) Patch
M chrome/browser/extensions/extension_disabled_ui_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -39 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +36 lines, -15 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 3 chunks +27 lines, -1 line 0 comments Download
M extensions/browser/extension_prefs.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -3 lines 0 comments Download
M extensions/browser/extension_prefs.cc View 1 2 3 4 5 6 7 8 1 chunk +14 lines, -9 lines 0 comments Download
M extensions/common/extension.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (5 generated)
binjin
Finnur, Benjamin: PTAL at this CL
6 years, 1 month ago (2014-11-11 15:02:52 UTC) #2
Finnur
As a general comment, I've never liked the DISABLE_NONE enum value because it looks, when ...
6 years, 1 month ago (2014-11-11 22:58:03 UTC) #4
Finnur
On 2014/11/11 22:58:03, Finnur wrote: > As a general comment, I've never liked the DISABLE_NONE ...
6 years, 1 month ago (2014-11-11 23:01:20 UTC) #5
not at google - send to devlin
On 2014/11/11 22:58:03, Finnur wrote: > As a general comment, I've never liked the DISABLE_NONE ...
6 years, 1 month ago (2014-11-12 00:44:34 UTC) #6
not at google - send to devlin
Had a cursory look, but my overwhelming reaction is that this is an awful lot ...
6 years, 1 month ago (2014-11-12 00:54:19 UTC) #7
not at google - send to devlin
(for me)
6 years, 1 month ago (2014-11-12 00:54:29 UTC) #8
binjin
okay, I will follow the easy way then. https://codereview.chromium.org/714133002/diff/40001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/40001/chrome/browser/extensions/extension_service.cc#newcode2181 chrome/browser/extensions/extension_service.cc:2181: *disable_reason ...
6 years, 1 month ago (2014-11-12 16:33:18 UTC) #9
not at google - send to devlin
https://codereview.chromium.org/714133002/diff/40001/chrome/browser/extensions/extension_service.h File chrome/browser/extensions/extension_service.h (right): https://codereview.chromium.org/714133002/diff/40001/chrome/browser/extensions/extension_service.h#newcode526 chrome/browser/extensions/extension_service.h:526: extensions::Extension::DisableReason initial_disable_reason, On 2014/11/12 16:33:18, bjin wrote: > On ...
6 years, 1 month ago (2014-11-12 16:38:42 UTC) #10
not at google - send to devlin
https://codereview.chromium.org/714133002/diff/40001/chrome/browser/extensions/extension_service.h File chrome/browser/extensions/extension_service.h (right): https://codereview.chromium.org/714133002/diff/40001/chrome/browser/extensions/extension_service.h#newcode526 chrome/browser/extensions/extension_service.h:526: extensions::Extension::DisableReason initial_disable_reason, On 2014/11/12 16:38:42, kalman wrote: > On ...
6 years, 1 month ago (2014-11-12 16:40:33 UTC) #11
binjin
On 2014/11/12 16:38:42, kalman wrote: > Cool! If you're going with this, it would be ...
6 years, 1 month ago (2014-11-12 16:50:49 UTC) #12
not at google - send to devlin
https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.cc#newcode2166 chrome/browser/extensions/extension_service.cc:2166: // Extensions disabled by managemeny policy should always be ...
6 years, 1 month ago (2014-11-12 18:02:15 UTC) #13
binjin
https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.cc#newcode2166 chrome/browser/extensions/extension_service.cc:2166: // Extensions disabled by managemeny policy should always be ...
6 years, 1 month ago (2014-11-12 18:39:02 UTC) #14
not at google - send to devlin
https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.h File chrome/browser/extensions/extension_service.h (right): https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.h#newcode551 chrome/browser/extensions/extension_service.h:551: // (or upgraded) extension. |disable_reason| will be ignored if ...
6 years, 1 month ago (2014-11-12 19:35:17 UTC) #15
binjin
https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.h File chrome/browser/extensions/extension_service.h (right): https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.h#newcode551 chrome/browser/extensions/extension_service.h:551: // (or upgraded) extension. |disable_reason| will be ignored if ...
6 years, 1 month ago (2014-11-13 12:03:31 UTC) #16
not at google - send to devlin
https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.h File chrome/browser/extensions/extension_service.h (right): https://codereview.chromium.org/714133002/diff/80001/chrome/browser/extensions/extension_service.h#newcode551 chrome/browser/extensions/extension_service.h:551: // (or upgraded) extension. |disable_reason| will be ignored if ...
6 years, 1 month ago (2014-11-13 17:41:21 UTC) #17
binjin
On 2014/11/13 17:41:21, kalman wrote: > No I mean that you should change the return ...
6 years, 1 month ago (2014-11-13 19:44:38 UTC) #18
not at google - send to devlin
On 2014/11/13 19:44:38, bjin wrote: > On 2014/11/13 17:41:21, kalman wrote: > > No I ...
6 years, 1 month ago (2014-11-13 20:23:27 UTC) #19
binjin
On 2014/11/13 20:23:27, kalman wrote: > I don't think ManagementPolicy::MustRemainDisabled is a good interface then. ...
6 years, 1 month ago (2014-11-13 23:21:21 UTC) #20
not at google - send to devlin
lgtm after adding the enum + updating histograms.xml https://codereview.chromium.org/714133002/diff/120001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/120001/chrome/browser/extensions/extension_service.cc#newcode2189 chrome/browser/extensions/extension_service.cc:2189: return ...
6 years, 1 month ago (2014-11-14 00:05:11 UTC) #21
binjin
@asvitkine, please have a look at tools/metrics/histograms/histograms.xml https://codereview.chromium.org/714133002/diff/120001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/120001/chrome/browser/extensions/extension_service.cc#newcode2189 chrome/browser/extensions/extension_service.cc:2189: return Extension::DISABLE_REMOTE_INSTALL; ...
6 years, 1 month ago (2014-11-14 12:28:26 UTC) #23
binjin
On 2014/11/14 12:28:26, bjin wrote: > @asvitkine, please have a look at tools/metrics/histograms/histograms.xml > > ...
6 years, 1 month ago (2014-11-14 15:52:26 UTC) #24
not at google - send to devlin
https://codereview.chromium.org/714133002/diff/160001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/160001/chrome/browser/extensions/extension_service.cc#newcode2174 chrome/browser/extensions/extension_service.cc:2174: disable_reason = static_cast<Extension::DisableReason>( Damn, ok, this static_cast<> isn't actually ...
6 years, 1 month ago (2014-11-14 17:20:43 UTC) #25
binjin
The test failures are still not addressed. https://codereview.chromium.org/714133002/diff/160001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/160001/chrome/browser/extensions/extension_service.cc#newcode2174 chrome/browser/extensions/extension_service.cc:2174: disable_reason = ...
6 years, 1 month ago (2014-11-14 18:21:59 UTC) #26
not at google - send to devlin
lgtm https://codereview.chromium.org/714133002/diff/200001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/200001/chrome/browser/extensions/extension_service.cc#newcode1609 chrome/browser/extensions/extension_service.cc:1609: disable_reasons = Extension::DISABLE_UNSUPPORTED_REQUIREMENT; This should probably be &= ...
6 years, 1 month ago (2014-11-14 18:34:51 UTC) #27
binjin
https://codereview.chromium.org/714133002/diff/200001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/200001/chrome/browser/extensions/extension_service.cc#newcode1609 chrome/browser/extensions/extension_service.cc:1609: disable_reasons = Extension::DISABLE_UNSUPPORTED_REQUIREMENT; On 2014/11/14 18:34:51, kalman wrote: > ...
6 years, 1 month ago (2014-11-14 18:38:26 UTC) #28
not at google - send to devlin
https://codereview.chromium.org/714133002/diff/200001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/714133002/diff/200001/chrome/browser/extensions/extension_service.cc#newcode1609 chrome/browser/extensions/extension_service.cc:1609: disable_reasons = Extension::DISABLE_UNSUPPORTED_REQUIREMENT; On 2014/11/14 18:38:26, bjin wrote: > ...
6 years, 1 month ago (2014-11-14 18:39:34 UTC) #29
binjin
I'm still unable to find proper way to handle the two failed tests, and I ...
6 years, 1 month ago (2014-11-14 18:59:22 UTC) #30
binjin
isherman, asvitkine: tools/metrics/histograms/histograms.xml kalman: I updated CL description and extension_disabled_ui_browsertest.cc, PTAL yoz: I'm removing two ...
6 years, 1 month ago (2014-11-17 12:35:46 UTC) #32
not at google - send to devlin
lgtm
6 years, 1 month ago (2014-11-17 17:08:47 UTC) #33
Ilya Sherman
histograms.xml lgtm
6 years, 1 month ago (2014-11-17 22:22:17 UTC) #34
Yoyo Zhou
LGTM, those tests were relevant about 18 versions of Chrome ago and shouldn't be needed ...
6 years, 1 month ago (2014-11-17 22:25:15 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/714133002/260001
6 years, 1 month ago (2014-11-18 11:02:29 UTC) #37
commit-bot: I haz the power
Committed patchset #13 (id:260001)
6 years, 1 month ago (2014-11-18 12:10:35 UTC) #38
commit-bot: I haz the power
6 years, 1 month ago (2014-11-18 12:11:24 UTC) #39
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/47947f841e18fa93ff2ec76ab731a57965dc98ec
Cr-Commit-Position: refs/heads/master@{#304587}

Powered by Google App Engine
This is Rietveld 408576698