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

Issue 695133005: Temporarily disable extensions and sync while a profile is locked - Profiles Approach (Closed)

Created:
6 years, 1 month ago by Mike Lerman
Modified:
6 years ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org, Ilya Sherman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Temporarily disable extensions and sync while a profile is locked. Place all the heavy lifting and logic in profiles code, with extensions providing a new collection for holding "locked" extensions. This replaces CL 697143003. BUG=354124 Committed: https://crrev.com/6a37b6a4b4914a5e762f90b673d1711ab8df7770 Cr-Commit-Position: refs/heads/master@{#305897}

Patch Set 1 #

Patch Set 2 : Rebase and git cl format #

Patch Set 3 : Don't disable sync. Use a locked_extensions() list. #

Patch Set 4 : Move all extensions logic into extension_serivice #

Patch Set 5 : Profiles only disable extensions on OSes where they exist #

Patch Set 6 : Fix unit test. Don't lock policy-forced extensions. #

Total comments: 39

Patch Set 7 : Address kalman@ and noms@ comments #

Patch Set 8 : Handle extensions being un-terminated or added during lock. #

Patch Set 9 : extension service's block_all bit set on Profile reload #

Total comments: 36

Patch Set 10 : More comments from noms@ and kalman@ #

Patch Set 11 : Don't change prefs upon block. Block works on generated sets. #

Patch Set 12 : Testing Cleanup #

Patch Set 13 : git cl format #

Patch Set 14 : Compiling is awesome #

Total comments: 20

Patch Set 15 : Remove BLOCKED state. Other kalman@ comments. #

Total comments: 12

Patch Set 16 : Extension Service unit tests #

Total comments: 6

Patch Set 17 : Many more unit tests. Change screenLockAPI permissions. Themes fix. #

Total comments: 1

Patch Set 18 : Rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+416 lines, -63 lines) Patch
M chrome/browser/background/background_contents_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc View 1 2 3 4 5 1 chunk +1 line, -6 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 5 chunks +25 lines, -4 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 12 chunks +81 lines, -23 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 2 chunks +184 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +45 lines, -2 lines 0 comments Download
M chrome/browser/themes/theme_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/_permission_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -11 lines 0 comments Download
M extensions/browser/extension_registry.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +26 lines, -7 lines 0 comments Download
M extensions/browser/extension_registry.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +30 lines, -4 lines 0 comments Download
M extensions/common/extension.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +0 lines, -1 line 2 comments Download

Messages

Total messages: 36 (7 generated)
Mike Lerman
Hi Benjamin, This is my new CL for disabling extensions from Profiles code using the ...
6 years, 1 month ago (2014-11-12 15:35:47 UTC) #2
Mike Lerman
Adding other reviewers: jwd - histograms.xml atwilson - c/b/background noms - c/b/profiles and Profile Lock ...
6 years, 1 month ago (2014-11-12 18:15:40 UTC) #4
not at google - send to devlin
https://codereview.chromium.org/695133005/diff/100001/chrome/browser/background/background_contents_service.cc File chrome/browser/background/background_contents_service.cc (right): https://codereview.chromium.org/695133005/diff/100001/chrome/browser/background/background_contents_service.cc#newcode479 chrome/browser/background/background_contents_service.cc:479: default: Cleanup: could you remove this default case entirely, ...
6 years, 1 month ago (2014-11-12 18:23:01 UTC) #5
noms (inactive)
https://codereview.chromium.org/695133005/diff/100001/chrome/browser/profiles/profile_window.cc File chrome/browser/profiles/profile_window.cc (right): https://codereview.chromium.org/695133005/diff/100001/chrome/browser/profiles/profile_window.cc#newcode62 chrome/browser/profiles/profile_window.cc:62: extension_service->LockAllExtensions(); Can this ever be NULL? https://codereview.chromium.org/695133005/diff/100001/chrome/browser/profiles/profile_window.cc#newcode131 chrome/browser/profiles/profile_window.cc:131: cache.ProfileIsSigninRequiredAtIndex(index)) ...
6 years, 1 month ago (2014-11-12 19:23:52 UTC) #6
Mike Lerman
Thanks kalman@ and noms@ for the comments. Mike https://codereview.chromium.org/695133005/diff/100001/chrome/browser/background/background_contents_service.cc File chrome/browser/background/background_contents_service.cc (right): https://codereview.chromium.org/695133005/diff/100001/chrome/browser/background/background_contents_service.cc#newcode479 chrome/browser/background/background_contents_service.cc:479: default: ...
6 years, 1 month ago (2014-11-12 20:58:43 UTC) #7
not at google - send to devlin
Ok, more comments. https://codereview.chromium.org/695133005/diff/100001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/695133005/diff/100001/chrome/browser/extensions/extension_service.cc#newcode963 chrome/browser/extensions/extension_service.cc:963: // Blacklisted extensions remain in the ...
6 years, 1 month ago (2014-11-12 23:41:43 UTC) #8
jwd
LGTM for histograms.
6 years, 1 month ago (2014-11-13 15:18:18 UTC) #9
noms (inactive)
profiles lgtm % nit. A test would be great -- I know you're working on ...
6 years, 1 month ago (2014-11-13 15:24:54 UTC) #10
Mike Lerman
https://codereview.chromium.org/695133005/diff/100001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/695133005/diff/100001/chrome/browser/extensions/extension_service.cc#newcode963 chrome/browser/extensions/extension_service.cc:963: // Blacklisted extensions remain in the blacklisted list. On ...
6 years, 1 month ago (2014-11-13 15:30:05 UTC) #11
not at google - send to devlin
Responding to your comments before I have another look at the current code. https://codereview.chromium.org/695133005/diff/160001/chrome/browser/extensions/extension_service.cc File ...
6 years, 1 month ago (2014-11-13 18:09:47 UTC) #12
Mike Lerman
https://codereview.chromium.org/695133005/diff/160001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/695133005/diff/160001/chrome/browser/extensions/extension_service.cc#newcode948 chrome/browser/extensions/extension_service.cc:948: On 2014/11/13 18:09:47, kalman wrote: > On 2014/11/13 15:30:05, ...
6 years, 1 month ago (2014-11-13 21:42:32 UTC) #13
chromium-reviews
Hi Benjamin or Drew, Any further comments for this CL? Thanks, Mike On Thu, Nov ...
6 years, 1 month ago (2014-11-17 13:35:52 UTC) #14
Andrew T Wilson (Slow)
lgtm with a few nits/questions. Also not 100% convinced that force installed extensions should remain ...
6 years, 1 month ago (2014-11-17 16:09:25 UTC) #15
not at google - send to devlin
https://codereview.chromium.org/695133005/diff/260001/chrome/browser/background/background_contents_service.cc File chrome/browser/background/background_contents_service.cc (right): https://codereview.chromium.org/695133005/diff/260001/chrome/browser/background/background_contents_service.cc#newcode465 chrome/browser/background/background_contents_service.cc:465: return; On 2014/11/17 16:09:24, Andrew T Wilson wrote: > ...
6 years, 1 month ago (2014-11-17 17:04:21 UTC) #16
Mike Lerman
https://codereview.chromium.org/695133005/diff/260001/chrome/browser/background/background_contents_service.cc File chrome/browser/background/background_contents_service.cc (right): https://codereview.chromium.org/695133005/diff/260001/chrome/browser/background/background_contents_service.cc#newcode479 chrome/browser/background/background_contents_service.cc:479: NOTREACHED(); On 2014/11/17 17:04:20, kalman wrote: > I think ...
6 years, 1 month ago (2014-11-19 14:54:34 UTC) #17
not at google - send to devlin
Patch looks fine, though I thought you had a test earlier? Maybe I'm remembering incorrectly. ...
6 years, 1 month ago (2014-11-19 20:20:42 UTC) #18
Mike Lerman
Hi kalman, I've addressed your comments and added unit tests for the extension_service. I'm working ...
6 years, 1 month ago (2014-11-20 17:18:34 UTC) #19
not at google - send to devlin
Cool! https://codereview.chromium.org/695133005/diff/280001/chrome/common/extensions/api/_permission_features.json File chrome/common/extensions/api/_permission_features.json (right): https://codereview.chromium.org/695133005/diff/280001/chrome/common/extensions/api/_permission_features.json#newcode932 chrome/common/extensions/api/_permission_features.json:932: "location": "component", On 2014/11/20 17:18:33, Mike Lerman wrote: ...
6 years, 1 month ago (2014-11-20 18:27:21 UTC) #20
Mike Lerman
Ilya, Are you okay with kalman@'s suggestion, re: https://codereview.chromium.org/695133005/diff/280001/chrome/common/extensions/api/_permission_features.json#newcode932 I have no issues with it, ...
6 years, 1 month ago (2014-11-20 19:10:33 UTC) #21
Ilya Sherman
https://codereview.chromium.org/695133005/diff/280001/chrome/common/extensions/api/_permission_features.json File chrome/common/extensions/api/_permission_features.json (right): https://codereview.chromium.org/695133005/diff/280001/chrome/common/extensions/api/_permission_features.json#newcode932 chrome/common/extensions/api/_permission_features.json:932: "location": "component", On 2014/11/20 18:27:20, kalman wrote: > On ...
6 years, 1 month ago (2014-11-21 02:08:41 UTC) #23
Mike Lerman
Hi kalman@, Added more unit tests, covering: enabled, disabled, forced-add-by-policy, blacklisted (before and after init()), ...
6 years, 1 month ago (2014-11-21 17:00:14 UTC) #26
not at google - send to devlin
lgtm
6 years, 1 month ago (2014-11-21 23:04:09 UTC) #27
Mike Lerman
ping pkotwicz@ Let me know if you have any questions about this CL!
6 years ago (2014-11-25 13:26:27 UTC) #28
pkotwicz
lgtm
6 years ago (2014-11-26 19:31:31 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/695133005/360001
6 years ago (2014-11-26 20:47:03 UTC) #31
commit-bot: I haz the power
Committed patchset #18 (id:360001)
6 years ago (2014-11-26 22:11:02 UTC) #32
commit-bot: I haz the power
Patchset 18 (id:??) landed as https://crrev.com/6a37b6a4b4914a5e762f90b673d1711ab8df7770 Cr-Commit-Position: refs/heads/master@{#305897}
6 years ago (2014-11-26 22:12:22 UTC) #33
binjin
https://codereview.chromium.org/695133005/diff/360001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/695133005/diff/360001/tools/metrics/histograms/histograms.xml#oldcode44127 tools/metrics/histograms/histograms.xml:44127: - <int value="8192" label="EXTERNAL_EXTENSION"/> Is there a reason to ...
6 years ago (2014-11-27 12:44:26 UTC) #35
Mike Lerman
6 years ago (2014-11-27 15:31:08 UTC) #36
Message was sent while issue was closed.
https://codereview.chromium.org/695133005/diff/360001/tools/metrics/histogram...
File tools/metrics/histograms/histograms.xml (left):

https://codereview.chromium.org/695133005/diff/360001/tools/metrics/histogram...
tools/metrics/histograms/histograms.xml:44127: -  <int value="8192"
label="EXTERNAL_EXTENSION"/>
On 2014/11/27 12:44:26, binjin wrote:
> Is there a reason to remove this disable reason? Or it's just a mistake in
> rebasing.

Apologies. Fixing in: https://codereview.chromium.org/763783002/

Powered by Google App Engine
This is Rietveld 408576698