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 a96b421a0b5b60922df8ae6d707b64ec12aa304b..7bd3000b7af238b120776c3e766e7f2bd9e8a490 100644 |
--- a/chrome/browser/content_settings/host_content_settings_map_factory.cc |
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc |
@@ -6,10 +6,12 @@ |
#include <utility> |
+#include "chrome/browser/prefs/pref_service_syncable_util.h" |
#include "chrome/browser/profiles/off_the_record_profile_impl.h" |
#include "chrome/browser/profiles/profile.h" |
#include "components/content_settings/core/browser/host_content_settings_map.h" |
#include "components/keyed_service/content/browser_context_dependency_manager.h" |
+#include "components/syncable_prefs/pref_service_syncable.h" |
#include "content/public/browser/browser_thread.h" |
#if defined(ENABLE_EXTENSIONS) |
@@ -72,6 +74,14 @@ scoped_refptr<RefcountedKeyedService> |
profile->GetProfileType() == Profile::INCOGNITO_PROFILE, |
profile->GetProfileType() == Profile::GUEST_PROFILE)); |
+ syncable_prefs::PrefServiceSyncable* pref_service = |
+ PrefServiceSyncableFromProfile(profile); |
+ if (pref_service) { |
+ pref_service->RegisterMergeDataFinishedCallback( |
+ base::Bind(&HostContentSettingsMap::MigrateDomainScopedSettings, |
+ settings_map->GetWeakPtr(), true)); |
raymes
2016/07/21 01:13:57
nit: we tend to document bools that we pass around
lshang
2016/07/22 02:58:38
Done.
|
+ } |
+ |
#if defined(ENABLE_EXTENSIONS) |
ExtensionService *ext_service = |
extensions::ExtensionSystem::Get(profile)->extension_service(); |