Index: chrome/browser/sync/profile_sync_components_factory_impl.cc |
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
index 9dd3fc902d1f49730e04e3f6c040edac7764e82c..dd17ac6efeca00c8f3d9b7f4b7fa979c04a9e46b 100644 |
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc |
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
@@ -45,6 +45,7 @@ |
#include "chrome/browser/webdata/autocomplete_syncable_service.h" |
#include "chrome/browser/webdata/autofill_profile_syncable_service.h" |
#include "chrome/browser/webdata/web_data_service.h" |
+#include "chrome/browser/webdata/web_data_service_factory.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "content/public/browser/browser_thread.h" |
@@ -223,9 +224,9 @@ base::WeakPtr<SyncableService> ProfileSyncComponentsFactoryImpl:: |
return profile_->GetPrefs()->GetSyncableService()->AsWeakPtr(); |
case syncable::AUTOFILL: |
case syncable::AUTOFILL_PROFILE: { |
- WebDataService* wds = |
- profile_->GetWebDataService(Profile::IMPLICIT_ACCESS); |
- if (!wds) |
+ scoped_refptr<WebDataService> wds = WebDataServiceFactory::GetForProfile( |
+ profile_, Profile::IMPLICIT_ACCESS); |
+ if (!wds.get()) |
return base::WeakPtr<SyncableService>(); |
if (type == syncable::AUTOFILL) |
return wds->GetAutocompleteSyncableService()->AsWeakPtr(); |