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

Unified Diff: chrome/browser/profiles/profile_manager.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 | « chrome/browser/extensions/extension_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 7db85b122e8af06411afa373d30fc720051f0735..72e0f2ae5dd178efc7c9b648f07919765a293afa 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1205,12 +1205,6 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
TRACE_EVENT0("browser", "ProfileManager::DoFinalInitForServices");
#if BUILDFLAG(ENABLE_EXTENSIONS)
- // Ensure that the HostContentSettingsMap has been created before the
- // ExtensionSystem is initialized otherwise the ExtensionSystem will be
- // registered twice
- HostContentSettingsMap* content_settings_map =
- HostContentSettingsMapFactory::GetForProfile(profile);
-
bool extensions_enabled = !go_off_the_record;
#if defined(OS_CHROMEOS)
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -1221,15 +1215,7 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
#endif
extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
extensions_enabled);
- // During tests, when |profile| is an instance of TestingProfile,
- // ExtensionSystem might not create an ExtensionService.
- // This block is duplicated in the HostContentSettingsMapFactory
- // ::BuildServiceInstanceFor method, it should be called once when both the
- // HostContentSettingsMap and the extension_service are set up.
- if (extensions::ExtensionSystem::Get(profile)->extension_service()) {
- extensions::ExtensionSystem::Get(profile)->extension_service()->
- RegisterContentSettings(content_settings_map);
- }
+
// Set the block extensions bit on the ExtensionService. There likely are no
// blockable extensions to block.
ProfileAttributesEntry* entry;
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698