Chromium Code Reviews| 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( |