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

Unified Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 10185008: Taking over issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
Index: chrome/browser/sync/profile_sync_components_factory_impl.cc
===================================================================
--- chrome/browser/sync/profile_sync_components_factory_impl.cc (revision 136877)
+++ chrome/browser/sync/profile_sync_components_factory_impl.cc (working copy)
@@ -47,6 +47,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"
@@ -87,9 +88,14 @@
: profile_(profile),
command_line_(command_line),
extension_system_(
- ExtensionSystem::Get(profile)) {
+ ExtensionSystemFactory::GetForProfile(profile)),
+ web_data_service_(WebDataServiceFactory::GetForProfile(
+ profile_, Profile::IMPLICIT_ACCESS)) {
}
+ProfileSyncComponentsFactoryImpl::~ProfileSyncComponentsFactoryImpl() {
+}
+
void ProfileSyncComponentsFactoryImpl::RegisterDataTypes(
ProfileSyncService* pss) {
// App sync is enabled by default. Register unless explicitly
@@ -227,14 +233,14 @@
return profile_->GetPrefs()->GetSyncableService()->AsWeakPtr();
case syncable::AUTOFILL:
case syncable::AUTOFILL_PROFILE: {
- WebDataService* wds =
- profile_->GetWebDataService(Profile::IMPLICIT_ACCESS);
- if (!wds)
+ if (!web_data_service_.get())
return base::WeakPtr<SyncableService>();
- if (type == syncable::AUTOFILL)
- return wds->GetAutocompleteSyncableService()->AsWeakPtr();
- else
- return wds->GetAutofillProfileSyncableService()->AsWeakPtr();
+ if (type == syncable::AUTOFILL) {
+ return web_data_service_->GetAutocompleteSyncableService()->AsWeakPtr();
+ } else {
+ return web_data_service_->
+ GetAutofillProfileSyncableService()->AsWeakPtr();
+ }
}
case syncable::APPS:
case syncable::EXTENSIONS:

Powered by Google App Engine
This is Rietveld 408576698