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

Issue 220353002: Remove //chrome dependency from ExtensionPrefs (Closed)

Created:
6 years, 8 months ago by Ken Rockot(use gerrit already)
Modified:
6 years, 8 months ago
Reviewers:
Yoyo Zhou, James Cook
CC:
chromium-reviews, tfarina, markusheintz_, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Remove //chrome dependency from ExtensionPrefs ExtensionPrefs::Observer has been extended with additional methods to accomodate the needs of Chrome's contentSettings API implementation. The ContentSettingsStore instance which was previously hosted by ExtensionPrefs is now hosted by an independent (BCKS) ContentSettingsService. ExtensionsBrowserClient gets a new method to allow a client to inject ExtensionPrefs observers between construction and initialization. Chrome's implementation ensures that a ContentSettingsStore exists and adds it as an ExtensionPrefs observer. Somewhat unfortunately this means that ExtensionPrefs construction and initialization has been partially split to allow observers to be added prior to initialization. BUG=357749, 162530 R=jamescook@chromium.org, yoz@chromium.org TBR=bauerb@chromium.org for c/b/content_settings, finnur@chromium.org for c/b/ui/webui/extensions Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261207

Patch Set 1 #

Total comments: 18

Patch Set 2 : embettering things #

Patch Set 3 : ContentSettingsService factory does not in fact depend on ExtensionPrefsFactory. #

Total comments: 13

Patch Set 4 : noDEPS #

Patch Set 5 : nits, pull out ExtensionPrefsObserver #

Total comments: 4

Patch Set 6 : cleanup #

Patch Set 7 : -_- #

Patch Set 8 : don't ref ContentSettingsStore if !ENABLE_EXTENSIONS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -110 lines) Patch
M apps/shell/browser/shell_extensions_browser_client.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M apps/shell/browser/shell_extensions_browser_client.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/content_settings/content_settings_api.cc View 4 chunks +4 lines, -3 lines 0 comments Download
A chrome/browser/extensions/api/content_settings/content_settings_service.h View 1 2 3 4 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/content_settings/content_settings_service.cc View 1 2 3 4 1 chunk +73 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_api.h View 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_api.cc View 6 chunks +12 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc View 5 chunks +22 lines, -5 lines 0 comments Download
M chrome/browser/extensions/browser_context_keyed_service_factories.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_prefs.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/extensions/extension_settings_handler.h View 1 2 3 4 4 chunks +4 lines, -3 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/browser/extension_prefs.h View 1 2 3 4 8 chunks +16 lines, -23 lines 0 comments Download
M extensions/browser/extension_prefs.cc View 1 2 3 4 5 6 14 chunks +74 lines, -62 lines 0 comments Download
M extensions/browser/extension_prefs_factory.cc View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
A extensions/browser/extension_prefs_observer.h View 1 2 3 4 5 6 1 chunk +41 lines, -0 lines 0 comments Download
M extensions/browser/extensions_browser_client.h View 1 2 3 4 5 3 chunks +9 lines, -0 lines 0 comments Download
M extensions/browser/test_extensions_browser_client.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/browser/test_extensions_browser_client.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Ken Rockot(use gerrit already)
6 years, 8 months ago (2014-04-01 00:33:36 UTC) #1
James Cook
Some initial thoughts. https://codereview.chromium.org/220353002/diff/1/apps/shell/browser/shell_extensions_browser_client.h File apps/shell/browser/shell_extensions_browser_client.h (right): https://codereview.chromium.org/220353002/diff/1/apps/shell/browser/shell_extensions_browser_client.h#newcode62 apps/shell/browser/shell_extensions_browser_client.h:62: virtual void AddExtensionPrefsObservers(content::BrowserContext* context, nit: In ...
6 years, 8 months ago (2014-04-01 18:45:02 UTC) #2
Ken Rockot(use gerrit already)
Thanks. I think this might be better. https://codereview.chromium.org/220353002/diff/1/apps/shell/browser/shell_extensions_browser_client.h File apps/shell/browser/shell_extensions_browser_client.h (right): https://codereview.chromium.org/220353002/diff/1/apps/shell/browser/shell_extensions_browser_client.h#newcode62 apps/shell/browser/shell_extensions_browser_client.h:62: virtual void ...
6 years, 8 months ago (2014-04-01 21:34:59 UTC) #3
James Cook
LGTM with nits https://codereview.chromium.org/220353002/diff/40001/chrome/browser/extensions/api/content_settings/content_settings_service.h File chrome/browser/extensions/api/content_settings/content_settings_service.h (right): https://codereview.chromium.org/220353002/diff/40001/chrome/browser/extensions/api/content_settings/content_settings_service.h#newcode35 chrome/browser/extensions/api/content_settings/content_settings_service.h:35: // ExtensionPrefs::Observer implementation nit: either end ...
6 years, 8 months ago (2014-04-01 22:09:37 UTC) #4
Ken Rockot(use gerrit already)
yoz@ can you please review as owner of */extensions/*? https://codereview.chromium.org/220353002/diff/40001/chrome/browser/extensions/api/content_settings/content_settings_service.h File chrome/browser/extensions/api/content_settings/content_settings_service.h (right): https://codereview.chromium.org/220353002/diff/40001/chrome/browser/extensions/api/content_settings/content_settings_service.h#newcode35 chrome/browser/extensions/api/content_settings/content_settings_service.h:35: ...
6 years, 8 months ago (2014-04-01 22:41:37 UTC) #5
Yoyo Zhou
LGTM https://chromiumcodereview.appspot.com/220353002/diff/80001/chrome/browser/extensions/chrome_extensions_browser_client.cc File chrome/browser/extensions/chrome_extensions_browser_client.cc (right): https://chromiumcodereview.appspot.com/220353002/diff/80001/chrome/browser/extensions/chrome_extensions_browser_client.cc#newcode125 chrome/browser/extensions/chrome_extensions_browser_client.cc:125: observers->push_back(content_settings); nit: can collapse 2 lines into 1 ...
6 years, 8 months ago (2014-04-02 01:40:33 UTC) #6
Ken Rockot(use gerrit already)
https://codereview.chromium.org/220353002/diff/80001/chrome/browser/extensions/chrome_extensions_browser_client.cc File chrome/browser/extensions/chrome_extensions_browser_client.cc (right): https://codereview.chromium.org/220353002/diff/80001/chrome/browser/extensions/chrome_extensions_browser_client.cc#newcode125 chrome/browser/extensions/chrome_extensions_browser_client.cc:125: observers->push_back(content_settings); On 2014/04/02 01:40:33, Yoyo Zhou wrote: > nit: ...
6 years, 8 months ago (2014-04-02 03:53:01 UTC) #7
Ken Rockot(use gerrit already)
The CQ bit was checked by rockot@chromium.org
6 years, 8 months ago (2014-04-02 03:53:10 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rockot@chromium.org/220353002/100001
6 years, 8 months ago (2014-04-02 03:53:21 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-02 04:18:53 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_compile_dbg
6 years, 8 months ago (2014-04-02 04:18:55 UTC) #11
Ken Rockot(use gerrit already)
The CQ bit was checked by rockot@chromium.org
6 years, 8 months ago (2014-04-02 04:50:46 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rockot@chromium.org/220353002/120001
6 years, 8 months ago (2014-04-02 04:51:16 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-02 06:39:59 UTC) #14
commit-bot: I haz the power
Retried try job too often on android_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_dbg&number=167056
6 years, 8 months ago (2014-04-02 06:40:00 UTC) #15
Ken Rockot(use gerrit already)
The CQ bit was checked by rockot@chromium.org
6 years, 8 months ago (2014-04-02 16:36:48 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rockot@chromium.org/220353002/140001
6 years, 8 months ago (2014-04-02 16:37:42 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-02 16:43:58 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_compile_dbg
6 years, 8 months ago (2014-04-02 16:43:59 UTC) #19
Ken Rockot(use gerrit already)
The CQ bit was checked by rockot@chromium.org
6 years, 8 months ago (2014-04-02 16:50:03 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rockot@chromium.org/220353002/140001
6 years, 8 months ago (2014-04-02 16:50:47 UTC) #21
Ken Rockot(use gerrit already)
6 years, 8 months ago (2014-04-02 22:52:25 UTC) #22
Message was sent while issue was closed.
Committed patchset #8 manually as r261207 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698