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

Issue 5742008: Clean up threading model of external extension providers (Closed)

Created:
10 years ago by gfeher
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, Paweł Hajdan Jr., Dmitry Polukhin, asargent_no_longer_on_chrome, Erik does not do reviews, brettw-cc_chromium.org, Aaron Boodman
Visibility:
Public.

Description

Clean up threading model of external extension providers Move blocking IO of loading the lists of external extensions from the UI thread to the FILE thread. Remove the ExternalPolicyExtensionProvider-specific parts from ExtensionsService. Side-effects: reduce the number of PostTask operations from 9 to 4. Trigger uninstall of external extensions immediately after they are removed from a policy. BUG=65107, 63667 TEST=ExtensionManagementTest.ExternalPolicyRefresh for the new functionality, lot of other extension tests are updated Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71427

Patch Set 1 : " #

Patch Set 2 : fix trybot fail & stuff #

Patch Set 3 : " #

Patch Set 4 : " #

Patch Set 5 : " #

Patch Set 6 : " #

Total comments: 38

Patch Set 7 : address comments #

Patch Set 8 : fix breakage #

Total comments: 12

Patch Set 9 : address new comments #

Patch Set 10 : rebase #

Patch Set 11 : rebase #

Patch Set 12 : final rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+898 lines, -719 lines) Patch
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
D base/values_util.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -26 lines 0 comments Download
D base/values_util.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -18 lines 0 comments Download
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_management_browsertest.cc View 1 2 3 4 5 6 3 chunks +12 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 5 6 7 8 9 10 8 chunks +36 lines, -19 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 15 chunks +89 lines, -211 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 5 6 7 8 9 17 chunks +48 lines, -23 lines 0 comments Download
A chrome/browser/extensions/external_extension_loader.h View 1 2 3 4 5 6 7 8 1 chunk +71 lines, -0 lines 0 comments Download
A chrome/browser/extensions/external_extension_loader.cc View 1 2 3 4 5 6 7 8 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/extensions/external_extension_provider_impl.h View 1 2 3 4 5 6 7 8 1 chunk +99 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/external_extension_provider_impl.cc View 1 2 3 4 5 6 7 8 4 chunks +98 lines, -34 lines 0 comments Download
A + chrome/browser/extensions/external_extension_provider_interface.h View 1 2 3 4 5 6 4 chunks +29 lines, -12 lines 0 comments Download
A chrome/browser/extensions/external_policy_extension_loader.h View 1 2 3 4 5 6 7 8 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/extensions/external_policy_extension_loader.cc View 1 2 3 4 5 6 7 8 1 chunk +103 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/external_policy_extension_loader_unittest.cc View 1 2 3 4 5 6 3 chunks +30 lines, -11 lines 0 comments Download
D chrome/browser/extensions/external_policy_extension_provider.h View 1 1 chunk +0 lines, -39 lines 0 comments Download
D chrome/browser/extensions/external_policy_extension_provider.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -77 lines 0 comments Download
A chrome/browser/extensions/external_pref_extension_loader.h View 1 2 3 4 5 6 7 8 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/extensions/external_pref_extension_loader.cc View 1 2 3 4 5 6 7 8 1 chunk +82 lines, -0 lines 0 comments Download
D chrome/browser/extensions/external_pref_extension_provider.h View 1 1 chunk +0 lines, -28 lines 0 comments Download
D chrome/browser/extensions/external_pref_extension_provider.cc View 1 1 chunk +0 lines, -57 lines 0 comments Download
A chrome/browser/extensions/external_registry_extension_loader_win.h View 1 2 3 4 5 6 7 8 1 chunk +28 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/external_registry_extension_loader_win.cc View 1 2 3 4 5 6 7 8 4 chunks +26 lines, -55 lines 0 comments Download
M chrome/browser/extensions/external_registry_extension_provider_win.h View 1 1 chunk +0 lines, -30 lines 0 comments Download
D chrome/browser/extensions/stateful_external_extension_provider.h View 1 1 chunk +0 lines, -61 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -9 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
gfeher
Hi, please review my rework of the external extension system. I don't have any short-term ...
9 years, 11 months ago (2011-01-01 23:00:17 UTC) #1
jochen (gone - plz use gerrit)
only had a quick look at it http://codereview.chromium.org/5742008/diff/34001/chrome/browser/extensions/extension_management_browsertest.cc File chrome/browser/extensions/extension_management_browsertest.cc (right): http://codereview.chromium.org/5742008/diff/34001/chrome/browser/extensions/extension_management_browsertest.cc#newcode375 chrome/browser/extensions/extension_management_browsertest.cc:375: for (i ...
9 years, 11 months ago (2011-01-04 12:38:01 UTC) #2
Sam Kerner (Chrome)
http://codereview.chromium.org/5742008/diff/34001/chrome/browser/extensions/extension_management_browsertest.cc File chrome/browser/extensions/extension_management_browsertest.cc (right): http://codereview.chromium.org/5742008/diff/34001/chrome/browser/extensions/extension_management_browsertest.cc#newcode376 chrome/browser/extensions/extension_management_browsertest.cc:376: EXPECT_FALSE("ogjcoiohnmldgjemafoockdghcjciccf" == (*i)->id()); Use kExtensionId instead of the string ...
9 years, 11 months ago (2011-01-04 14:06:00 UTC) #3
gfeher
Addressed comments. http://codereview.chromium.org/5742008/diff/34001/chrome/browser/extensions/extension_management_browsertest.cc File chrome/browser/extensions/extension_management_browsertest.cc (right): http://codereview.chromium.org/5742008/diff/34001/chrome/browser/extensions/extension_management_browsertest.cc#newcode375 chrome/browser/extensions/extension_management_browsertest.cc:375: for (i = extensions->begin(); i != extensions->end(); ...
9 years, 11 months ago (2011-01-04 23:37:09 UTC) #4
Sam Kerner (Chrome)
LGTM Given the number of reviewers, you might give the others a chance to take ...
9 years, 11 months ago (2011-01-05 20:49:25 UTC) #5
Aaron Boodman
I will take a look at this today.
9 years, 11 months ago (2011-01-05 20:58:08 UTC) #6
Aaron Boodman
I only skimmed this, it seems reasonable though. Thanks a lot for the cleanup. http://codereview.chromium.org/5742008/diff/79001/chrome/browser/extensions/external_extension_loader.cc ...
9 years, 11 months ago (2011-01-06 18:54:39 UTC) #7
gfeher
Addressed all comments, except for the 'Interface' suffix. Jochen, please join that discussion. I am ...
9 years, 11 months ago (2011-01-07 00:10:01 UTC) #8
gfeher
ping?
9 years, 11 months ago (2011-01-10 19:56:54 UTC) #9
jochen (gone - plz use gerrit)
On 2011/01/07 00:10:01, gfeher wrote: > Addressed all comments, except for the 'Interface' suffix. Jochen, ...
9 years, 11 months ago (2011-01-10 20:01:12 UTC) #10
Aaron Boodman
On 2011/01/10 20:01:12, jochen wrote: > > Should I change this to Delegate, then? > ...
9 years, 11 months ago (2011-01-11 20:51:29 UTC) #11
gfeher
9 years, 11 months ago (2011-01-12 19:08:33 UTC) #12
Follow up: we had a discussion with Aaron about the following issue: instead of
passing the prefs dictionary in ExternalExtensionLoader via a member variable,
it would be better to pass a copy of it as a function argument. E.g. calling the
following via PostTask:
void ExternalExtensionLoader::LoadFinished(DictionaryValue* prefs)
This approach is simpler and nicer, but I believe I've found a catch. If the
message loop shuts down while the posted task is pending, then the content of
prefs gets memory-leaked. Freeing it safely would need some extra machinery, and
I'd like to defer that from this CL.

Summary: I am planning to land this CL as-is tomorrow, unless somebody objects.

Powered by Google App Engine
This is Rietveld 408576698