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

Issue 2866613003: Solve ProfileIOData, Extension, HostContentSettingsMap ordering issue. (Closed)

Created:
3 years, 7 months ago by mmenke
Modified:
3 years, 7 months ago
Reviewers:
Bernhard Bauer, Devlin
CC:
chromium-reviews, extensions-reviews_chromium.org, msramek+watch_chromium.org, raymes+watch_chromium.org, rginda+watch_chromium.org, chromium-apps-reviews_chromium.org, markusheintz_
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Solve ProfileIOData, Extension, HostContentSettingsMap ordering issue. There's a chicken/egg/omelette(?) issue during set up: * ProfilIOData needs to grab HostContentSettingsMap on creation, and it can be used at any point after creation to create a URLRequestContext, which can use the HostContentSettingsMap. * ExtensionSystem needs to modify the HostContentSettingsMap before the map is used. * ExtensionSystem needs access to the URLRequestContextGetter, which ProfileIOData creates, but needs the HostContentSettingsMap before it can safely create it. This CL just makes the ExtensionSystem method to hook into HostContentSettingsMap static, and the map sets up the hook on construction. Since the method to set up hooks wasn't depending on any members of the ExtensionSystem, this should just "work" This bug has existed a while, but we never ran into DCHECKs as a result because while the URLRequestContext was potentially being set up with the HostContentSettingsMap was fully initialized, we generally weren't issuing network requests until after the ExtensionSystem set up the map. https://codereview.chromium.org/2841163002/ changed that, since the ProxyService may figure out it needs a PAC file and fetch it any time after the URLRequestContext is created. BUG=718835 Review-Url: https://codereview.chromium.org/2866613003 Cr-Commit-Position: refs/heads/master@{#471853} Committed: https://chromium.googlesource.com/chromium/src/+/ad5094aba23fb6260d618c3223bb22d2deb85d6f

Patch Set 1 #

Patch Set 2 : Fix? #

Total comments: 6

Patch Set 3 : Response to comments #

Total comments: 2

Patch Set 4 : Fix build #

Total comments: 2

Patch Set 5 : Uninteresting merge, add TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -27 lines) Patch
M chrome/browser/content_settings/host_content_settings_map_factory.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 1 chunk +10 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 2 chunks +1 line, -15 lines 0 comments Download

Messages

Total messages: 39 (26 generated)
mmenke
Is this sane? It looks to me like content_settings::InternalExtensionProvider and content_settings::CustomExtensionProvider are safe to create ...
3 years, 7 months ago (2017-05-05 22:12:21 UTC) #10
Devlin
https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc#newcode2053 chrome/browser/extensions/extension_service.cc:2053: if (!extensions::ContentSettingsService::Get(profile)) The ContentSettingsService is just a BrowserContextKeyedService that's ...
3 years, 7 months ago (2017-05-05 22:27:56 UTC) #12
mmenke
https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc#newcode2053 chrome/browser/extensions/extension_service.cc:2053: if (!extensions::ContentSettingsService::Get(profile)) On 2017/05/05 22:27:56, Devlin wrote: > The ...
3 years, 7 months ago (2017-05-05 22:54:34 UTC) #13
Devlin
https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc#newcode2053 chrome/browser/extensions/extension_service.cc:2053: if (!extensions::ContentSettingsService::Get(profile)) On 2017/05/05 22:54:34, mmenke wrote: > On ...
3 years, 7 months ago (2017-05-05 23:00:08 UTC) #14
mmenke
On 2017/05/05 23:00:08, Devlin wrote: > https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc > File chrome/browser/extensions/extension_service.cc (right): > > https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc#newcode2053 > ...
3 years, 7 months ago (2017-05-05 23:11:56 UTC) #15
Bernhard Bauer
LGTM, thanks!
3 years, 7 months ago (2017-05-08 10:38:52 UTC) #18
mmenke
Thanks, Devlin! PTAL. https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc#newcode2053 chrome/browser/extensions/extension_service.cc:2053: if (!extensions::ContentSettingsService::Get(profile)) On 2017/05/05 23:00:08, Devlin ...
3 years, 7 months ago (2017-05-08 17:50:35 UTC) #21
Devlin
LGTM https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2866613003/diff/20001/chrome/browser/extensions/extension_service.cc#newcode2053 chrome/browser/extensions/extension_service.cc:2053: if (!extensions::ContentSettingsService::Get(profile)) On 2017/05/08 17:50:35, mmenke wrote: > ...
3 years, 7 months ago (2017-05-15 16:53:21 UTC) #28
mmenke
Thanks for helping me understand this code! https://codereview.chromium.org/2866613003/diff/60001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/2866613003/diff/60001/chrome/browser/extensions/extension_service.cc#newcode2068 chrome/browser/extensions/extension_service.cc:2068: false))); On ...
3 years, 7 months ago (2017-05-15 17:08:17 UTC) #29
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/2866613003/80001
3 years, 7 months ago (2017-05-15 17:09:11 UTC) #32
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/444681)
3 years, 7 months ago (2017-05-15 17:34:02 UTC) #34
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/2866613003/80001
3 years, 7 months ago (2017-05-15 17:37:13 UTC) #36
commit-bot: I haz the power
3 years, 7 months ago (2017-05-15 19:01:30 UTC) #39
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/ad5094aba23fb6260d618c3223bb...

Powered by Google App Engine
This is Rietveld 408576698