Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(1)

Issue 2693373003: PreloadCheck class for extension pre-install checks (Closed)

Created:
9 months ago by michaelpg
Modified:
8 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, rkc
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add PreloadCheck class for extension pre-install checks PreloadCheck is an abstract preload check for an extension that may be asynchronous. The idea is to de-duplicate ad-hoc checks into PreloadCheck subclasses, then use these classes from places like ExtensionInstallChecker, CrxInstaller, and ManagementAPI. This will enable some of these classes to be moved into //extensions, because we would be able to pick and choose which checks to run. E.g., AppShell would only use checks from //extensions, while Chrome would also add checks from //chrome like BlacklistCheck. See go/loading-extensions-in-appshell for more details on how this relates to AppShell and launching apps/extensions. BUG=679971 Review-Url: https://codereview.chromium.org/2693373003 Cr-Commit-Position: refs/heads/master@{#457943} Committed: https://chromium.googlesource.com/chromium/src/+/c0145e6a749a559b1c50ecf2176f9ef0fce68c09

Patch Set 1 #

Patch Set 2 : getting back to this #

Patch Set 3 : review ready #

Total comments: 28

Patch Set 4 : devlin feedback #

Patch Set 5 : missed one #

Patch Set 6 : ...and the rest #

Patch Set 7 : rebase #

Total comments: 26

Patch Set 8 : rebase #

Patch Set 9 : use ExtensionsTest #

Patch Set 10 : devlin #

Total comments: 14

Patch Set 11 : devlin 2 #

Patch Set 12 : rebase #

Patch Set 13 : fwd declare #

Patch Set 14 : rebase #

Patch Set 15 : don't break enable_extensions=false #

Unified diffs Side-by-side diffs Delta from patch set Stats (+567 lines, -0 lines) Patch
M chrome/browser/extensions/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/extensions/blacklist_check.h View 1 2 3 4 5 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/browser/extensions/blacklist_check.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/extensions/blacklist_check_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +86 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M extensions/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +21 lines, -0 lines 0 comments Download
A extensions/browser/policy_check.h View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
A extensions/browser/policy_check.cc View 1 2 3 4 5 1 chunk +33 lines, -0 lines 0 comments Download
A extensions/browser/policy_check_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +122 lines, -0 lines 0 comments Download
A extensions/browser/preload_check.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +56 lines, -0 lines 0 comments Download
A extensions/browser/preload_check.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +20 lines, -0 lines 0 comments Download
A extensions/browser/preload_check_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +56 lines, -0 lines 0 comments Download
A extensions/browser/preload_check_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +50 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 31 (13 generated)
michaelpg
Devlin, PTAL. I'm kind of sad this ended up being so big, but it'll be ...
8 months, 2 weeks ago (2017-03-07 20:29:11 UTC) #4
Devlin
So, overall, I think this is pretty nice. It's clean and concise and we've probably ...
8 months, 2 weeks ago (2017-03-08 03:01:50 UTC) #6
michaelpg
On 2017/03/08 03:01:50, Devlin wrote: > So, overall, I think this is pretty nice. It's ...
8 months, 2 weeks ago (2017-03-08 03:30:09 UTC) #7
michaelpg
Thanks for the feedback. Mind helping me out with the TestExtensionBrowserClient stuff? https://codereview.chromium.org/2693373003/diff/40001/chrome/browser/extensions/blacklist_check.cc File chrome/browser/extensions/blacklist_check.cc ...
8 months, 1 week ago (2017-03-09 01:53:30 UTC) #8
michaelpg
https://codereview.chromium.org/2693373003/diff/40001/extensions/browser/policy_check_unittest.cc File extensions/browser/policy_check_unittest.cc (right): https://codereview.chromium.org/2693373003/diff/40001/extensions/browser/policy_check_unittest.cc#newcode71 extensions/browser/policy_check_unittest.cc:71: ExtensionsBrowserClient::Set(&extensions_browser_client_); On 2017/03/09 01:53:30, michaelpg wrote: > On 2017/03/08 ...
8 months, 1 week ago (2017-03-13 19:18:30 UTC) #9
michaelpg
https://codereview.chromium.org/2693373003/diff/40001/extensions/browser/policy_check_unittest.cc File extensions/browser/policy_check_unittest.cc (right): https://codereview.chromium.org/2693373003/diff/40001/extensions/browser/policy_check_unittest.cc#newcode71 extensions/browser/policy_check_unittest.cc:71: ExtensionsBrowserClient::Set(&extensions_browser_client_); On 2017/03/13 19:18:30, michaelpg wrote: > On 2017/03/09 ...
8 months, 1 week ago (2017-03-13 20:11:49 UTC) #10
michaelpg
https://codereview.chromium.org/2693373003/diff/40001/extensions/browser/policy_check_unittest.cc File extensions/browser/policy_check_unittest.cc (right): https://codereview.chromium.org/2693373003/diff/40001/extensions/browser/policy_check_unittest.cc#newcode71 extensions/browser/policy_check_unittest.cc:71: ExtensionsBrowserClient::Set(&extensions_browser_client_); On 2017/03/13 19:18:30, michaelpg wrote: > On 2017/03/09 ...
8 months, 1 week ago (2017-03-13 20:11:50 UTC) #11
michaelpg
PTAnotherL -- see how PS9 differs from PS8 for the test fix.
8 months, 1 week ago (2017-03-13 20:23:34 UTC) #12
Devlin
I'm still not 100% sure we'll stick with this interface, but I think it's close ...
8 months, 1 week ago (2017-03-14 01:44:34 UTC) #13
michaelpg
Thanks for the thoughtful comments. The tests look better but I did have some specific ...
8 months, 1 week ago (2017-03-14 21:58:30 UTC) #14
Devlin
A few more nits, but I think they're all pretty straightforward, so lgtm. Lemme know ...
8 months ago (2017-03-16 01:42:45 UTC) #15
michaelpg
phew https://codereview.chromium.org/2693373003/diff/120001/extensions/browser/policy_check_unittest.cc File extensions/browser/policy_check_unittest.cc (right): https://codereview.chromium.org/2693373003/diff/120001/extensions/browser/policy_check_unittest.cc#newcode52 extensions/browser/policy_check_unittest.cc:52: class TestExtensionSystem : public MockExtensionSystem { On 2017/03/16 ...
8 months ago (2017-03-17 02:34:26 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2693373003/260001
8 months ago (2017-03-17 23:14:57 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/231006) android_cronet on master.tryserver.chromium.android (JOB_FAILED, ...
8 months ago (2017-03-17 23:20:58 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2693373003/280001
8 months ago (2017-03-17 23:36:01 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/403395) win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, ...
8 months ago (2017-03-18 01:26:52 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2693373003/280001
8 months ago (2017-03-18 01:44:09 UTC) #28
commit-bot: I haz the power
8 months ago (2017-03-18 03:01:00 UTC) #31
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/c0145e6a749a559b1c50ecf2176f...

Powered by Google App Engine
This is Rietveld efc10ee0f