| Index: components/content_settings/core/browser/host_content_settings_map.cc | 
| diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc | 
| index 3dbb4f57c2e635169c58ad0faade19a2efb967ee..015705ebc8ea9a38646b344a50006d6e06ead63b 100644 | 
| --- a/components/content_settings/core/browser/host_content_settings_map.cc | 
| +++ b/components/content_settings/core/browser/host_content_settings_map.cc | 
| @@ -118,11 +118,7 @@ content_settings::PatternPair GetPatternsFromScopingType( | 
| content_settings::PatternPair patterns; | 
|  | 
| switch (scoping_type) { | 
| -    case WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE: | 
| -    case WebsiteSettingsInfo::REQUESTING_DOMAIN_ONLY_SCOPE: | 
| -      patterns.first = ContentSettingsPattern::FromURL(primary_url); | 
| -      patterns.second = ContentSettingsPattern::Wildcard(); | 
| -      break; | 
| +    case WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE: | 
| case WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE: | 
| patterns.first = ContentSettingsPattern::FromURLNoWildcard(primary_url); | 
| patterns.second = ContentSettingsPattern::Wildcard(); | 
| @@ -147,7 +143,8 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, | 
| used_from_thread_id_(base::PlatformThread::CurrentId()), | 
| #endif | 
| prefs_(prefs), | 
| -      is_off_the_record_(is_incognito_profile || is_guest_profile) { | 
| +      is_off_the_record_(is_incognito_profile || is_guest_profile), | 
| +      weak_ptr_factory_(this) { | 
| DCHECK(!(is_incognito_profile && is_guest_profile)); | 
|  | 
| content_settings::PolicyProvider* policy_provider = | 
| @@ -172,7 +169,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, | 
| content_settings_providers_[DEFAULT_PROVIDER] = default_provider; | 
|  | 
| MigrateKeygenSettings(); | 
| - | 
| +  MigrateDomainScopedSettings(); | 
| RecordNumberOfExceptions(); | 
| } | 
|  | 
| @@ -920,3 +917,7 @@ HostContentSettingsMap::GetContentSettingValueAndPatterns( | 
| } | 
| return std::unique_ptr<base::Value>(); | 
| } | 
| + | 
| +base::WeakPtr<HostContentSettingsMap> HostContentSettingsMap::GetWeakPtr() { | 
| +  return weak_ptr_factory_.GetWeakPtr(); | 
| +} | 
|  |