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

Unified Diff: chrome/browser/content_settings/host_content_settings_map_factory.cc

Issue 2866613003: Solve ProfileIOData, Extension, HostContentSettingsMap ordering issue. (Closed)
Patch Set: Uninteresting merge, add TODO Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/host_content_settings_map_factory.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc
index c1a9a79d48e4064f181e7515d37a71b5934cba60..a3465561e0b82d26889314daa44e73579075289e 100644
--- a/chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -93,12 +93,9 @@ scoped_refptr<RefcountedKeyedService>
}
#if BUILDFLAG(ENABLE_EXTENSIONS)
- ExtensionService *ext_service =
- extensions::ExtensionSystem::Get(profile)->extension_service();
- // This may be null in testing or when the extenion_service hasn't been
- // initialized, in which case it will be registered then.
- if (ext_service)
- ext_service->RegisterContentSettings(settings_map.get());
+ // These must be registered before before the HostSettings are passed over to
+ // the IOThread. Simplest to do this on construction.
+ ExtensionService::RegisterContentSettings(settings_map.get(), profile);
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
SupervisedUserSettingsService* supervised_service =
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698