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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 2866613003: Solve ProfileIOData, Extension, HostContentSettingsMap ordering issue. (Closed)
Patch Set: Response to comments 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.h ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index ad71689d7a0f1542241593dd9f90dea75aed5374..8557be2c1ded3e91b80c7205d017cb498b9d5a94 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2047,21 +2047,25 @@ const Extension* ExtensionService::GetPendingExtensionUpdate(
}
void ExtensionService::RegisterContentSettings(
- HostContentSettingsMap* host_content_settings_map) {
+ HostContentSettingsMap* host_content_settings_map,
+ Profile* profile) {
+ // Most extension services key off of the original profile.
+ Profile* profile = profile->GetOriginalProfile();
+
TRACE_EVENT0("browser,startup", "ExtensionService::RegisterContentSettings");
DCHECK_CURRENTLY_ON(BrowserThread::UI);
host_content_settings_map->RegisterProvider(
HostContentSettingsMap::INTERNAL_EXTENSION_PROVIDER,
std::unique_ptr<content_settings::ObservableProvider>(
- new content_settings::InternalExtensionProvider(profile_)));
+ new content_settings::InternalExtensionProvider(profile)));
host_content_settings_map->RegisterProvider(
HostContentSettingsMap::CUSTOM_EXTENSION_PROVIDER,
std::unique_ptr<content_settings::ObservableProvider>(
new content_settings::CustomExtensionProvider(
- extensions::ContentSettingsService::Get(profile_)
+ extensions::ContentSettingsService::Get(profile)
->content_settings_store(),
- profile_->GetOriginalProfile() != profile_)));
+ profile->GetOriginalProfile() != profile)));
mmenke 2017/05/08 17:50:35 Is the comparison in line 2068 always true?
Devlin 2017/05/15 16:53:21 Yes, it will be. See also other comment.
}
void ExtensionService::TrackTerminatedExtension(
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698