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

Issue 1495403002: Observe adding external extensions via windows registry. (Closed)

Created:
5 years ago by lazyboy
Modified:
4 years, 11 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Observe adding external extensions via windows registry. Install the extension right away (no chrome restart). For registry changes, we only look at 32-bit registry values for extensions, see https://developer.chrome.com/extensions/external_extensions#registry A lot of the changes in this CL is to make ExternalProvider-s be able to discover new external extensions at times other than chrome start up. The added method is OnExternalProviderUpdateComplete(), which provides a list of a. Extensions that were added via update_url, b. Extensions that were added via crx, c. Extensions that were removed. BUG=581756 Test=While chrome is running, add a registry entry for an extension under HKLM or HKCU as described in https://developer.chrome.com/extensions/external_extensions#registry Now observe that external install would appear for that extension in chrome shortly. If you had some extension installed this way, removing the registry entry would cause the extension to be uninstalled too! Committed: https://crrev.com/e8634172cb47984f8432daf97f62bd578311d8f1 Cr-Commit-Position: refs/heads/master@{#371911}

Patch Set 1 #

Patch Set 2 : clean up a little #

Patch Set 3 : Almost there #

Patch Set 4 : removal added #

Patch Set 5 : some shuffle #

Patch Set 6 : update works now #

Patch Set 7 : cleaned up params, this contains lots of debug info still #

Patch Set 8 : cleaned up, removed logs #

Total comments: 12

Patch Set 9 : address comments from asargent and devlin #

Total comments: 5

Patch Set 10 : guard updater_->CheckNow() call, rework Provider->ExtensionService interaction #

Total comments: 6

Patch Set 11 : fix unit_test compile, ExternalPolicyProviderTest.*;ExtensionServiceTest.* #

Patch Set 12 : Fix cros + mac compile, move ExternalExtensionInstallInfo* files to separate header #

Patch Set 13 : add missing files #

Total comments: 16

Patch Set 14 : address comments from asargent@ and add tests #

Patch Set 15 : rebase @tott #

Patch Set 16 : some minor nit fixes and removing some includes with fwd declaring in some header files #

Patch Set 17 : fix chromeos compile #

Patch Set 18 : move prefs to OnUpdated's param, instead of storing, to avoid multi-thread issues #

Total comments: 1

Patch Set 19 : sync @tott #

Unified diffs Side-by-side diffs Delta from patch set Stats (+796 lines, -509 lines) Patch
M chrome/browser/chromeos/customization/customization_document_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +27 lines, -35 lines 0 comments Download
M chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +25 lines, -27 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 1 chunk +12 lines, -14 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 10 chunks +84 lines, -53 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 24 chunks +342 lines, -329 lines 0 comments Download
M chrome/browser/extensions/external_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/external_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/external_policy_loader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +17 lines, -16 lines 0 comments Download
M chrome/browser/extensions/external_provider_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/extensions/external_provider_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +66 lines, -17 lines 0 comments Download
M chrome/browser/extensions/external_registry_loader_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/external_registry_loader_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +59 lines, -4 lines 0 comments Download
A extensions/browser/external_install_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +67 lines, -0 lines 0 comments Download
A extensions/browser/external_install_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +49 lines, -0 lines 0 comments Download
M extensions/browser/external_provider_interface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +17 lines, -14 lines 0 comments Download
M extensions/extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (15 generated)
lazyboy
Hi Anthony and Devlin, I'd like to get some feedback on the current iteration of ...
4 years, 11 months ago (2016-01-20 05:54:59 UTC) #4
asargent_no_longer_on_chrome
https://chromiumcodereview.appspot.com/1495403002/diff/140001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://chromiumcodereview.appspot.com/1495403002/diff/140001/chrome/browser/extensions/extension_service.cc#newcode243 chrome/browser/extensions/extension_service.cc:243: updater_->CheckNow(empty_params); It seems a little unfortunate to kick off ...
4 years, 11 months ago (2016-01-20 22:49:00 UTC) #6
Devlin
I didn't see anything much in addition to what Antony mentioned. https://codereview.chromium.org/1495403002/diff/140001/chrome/browser/extensions/external_provider_impl.cc File chrome/browser/extensions/external_provider_impl.cc (right): ...
4 years, 11 months ago (2016-01-21 00:14:26 UTC) #7
lazyboy
+scottmg for winregistry observing changes, specifically external_loader_win.cc https://chromiumcodereview.appspot.com/1495403002/diff/140001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://chromiumcodereview.appspot.com/1495403002/diff/140001/chrome/browser/extensions/extension_service.cc#newcode243 chrome/browser/extensions/extension_service.cc:243: updater_->CheckNow(empty_params); On ...
4 years, 11 months ago (2016-01-21 21:02:12 UTC) #9
scottmg
I'm afraid I've never actually used the registry watcher, but this looks fine to me. ...
4 years, 11 months ago (2016-01-21 21:16:16 UTC) #10
lazyboy
https://chromiumcodereview.appspot.com/1495403002/diff/160001/chrome/browser/extensions/external_registry_loader_win.cc File chrome/browser/extensions/external_registry_loader_win.cc (right): https://chromiumcodereview.appspot.com/1495403002/diff/160001/chrome/browser/extensions/external_registry_loader_win.cc#newcode206 chrome/browser/extensions/external_registry_loader_win.cc:206: KEY_NOTIFY | KEY_WOW64_32KEY) == ERROR_SUCCESS) { On 2016/01/21 21:16:16, ...
4 years, 11 months ago (2016-01-21 21:24:48 UTC) #11
lazyboy
@asargent, I've made the changes we've discussed offline, please take a look, thanks. https://chromiumcodereview.appspot.com/1495403002/diff/180001/chrome/browser/extensions/extension_service.cc File ...
4 years, 11 months ago (2016-01-22 07:52:41 UTC) #12
asargent_no_longer_on_chrome
I like the changes. Just a couple of small nits/suggestions https://chromiumcodereview.appspot.com/1495403002/diff/160001/chrome/browser/extensions/external_registry_loader_win.cc File chrome/browser/extensions/external_registry_loader_win.cc (right): https://chromiumcodereview.appspot.com/1495403002/diff/160001/chrome/browser/extensions/external_registry_loader_win.cc#newcode206 ...
4 years, 11 months ago (2016-01-25 18:50:52 UTC) #13
lazyboy
https://chromiumcodereview.appspot.com/1495403002/diff/160001/chrome/browser/extensions/external_registry_loader_win.cc File chrome/browser/extensions/external_registry_loader_win.cc (right): https://chromiumcodereview.appspot.com/1495403002/diff/160001/chrome/browser/extensions/external_registry_loader_win.cc#newcode206 chrome/browser/extensions/external_registry_loader_win.cc:206: KEY_NOTIFY | KEY_WOW64_32KEY) == ERROR_SUCCESS) { On 2016/01/25 18:50:52, ...
4 years, 11 months ago (2016-01-26 05:20:05 UTC) #14
asargent_no_longer_on_chrome
lgtm https://chromiumcodereview.appspot.com/1495403002/diff/240001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://chromiumcodereview.appspot.com/1495403002/diff/240001/chrome/browser/extensions/extension_service.cc#newcode256 chrome/browser/extensions/extension_service.cc:256: CheckExternalUninstall(id); On 2016/01/26 05:20:04, lazyboy wrote: > On ...
4 years, 11 months ago (2016-01-26 17:48:07 UTC) #15
lazyboy
https://chromiumcodereview.appspot.com/1495403002/diff/160001/chrome/browser/extensions/external_registry_loader_win.cc File chrome/browser/extensions/external_registry_loader_win.cc (right): https://chromiumcodereview.appspot.com/1495403002/diff/160001/chrome/browser/extensions/external_registry_loader_win.cc#newcode206 chrome/browser/extensions/external_registry_loader_win.cc:206: KEY_NOTIFY | KEY_WOW64_32KEY) == ERROR_SUCCESS) { On 2016/01/26 05:20:04, ...
4 years, 11 months ago (2016-01-26 23:44:43 UTC) #16
asargent_no_longer_on_chrome
new version lgtm
4 years, 11 months ago (2016-01-27 00:49:32 UTC) #17
lazyboy
+achuith@chromiu.org for chrome/browser/chromeos/customization/customization_document_unittest.cc
4 years, 11 months ago (2016-01-27 22:06:48 UTC) #24
achuithb
On 2016/01/27 22:06:48, lazyboy wrote: > mailto:+achuith@chromiu.org for > chrome/browser/chromeos/customization/customization_document_unittest.cc lgtm for c/b/cros
4 years, 11 months ago (2016-01-27 22:22:00 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1495403002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1495403002/360001
4 years, 11 months ago (2016-01-27 23:28:49 UTC) #28
commit-bot: I haz the power
Committed patchset #19 (id:360001)
4 years, 11 months ago (2016-01-28 00:10:56 UTC) #30
commit-bot: I haz the power
4 years, 11 months ago (2016-01-28 00:11:58 UTC) #32
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/e8634172cb47984f8432daf97f62bd578311d8f1
Cr-Commit-Position: refs/heads/master@{#371911}

Powered by Google App Engine
This is Rietveld 408576698