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

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

Issue 8184001: The AutofillProfileSyncableService's lifetime should be managed by the WebDataService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ensure that destruction occurs on the DB thread Created 9 years, 2 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_factory_impl.cc
diff --git a/chrome/browser/sync/profile_sync_factory_impl.cc b/chrome/browser/sync/profile_sync_factory_impl.cc
index 7658635f751c8fe3410e8a49a481167061ec40d7..6ecd0f3a34f936fa554873970b050b08e97ddca5 100644
--- a/chrome/browser/sync/profile_sync_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_factory_impl.cc
@@ -41,6 +41,8 @@
#include "chrome/browser/sync/profile_sync_factory_impl.h"
#include "chrome/browser/sync/signin_manager.h"
#include "chrome/browser/webdata/autofill_profile_syncable_service.h"
+#include "chrome/browser/webdata/autofill_table.h"
+#include "chrome/browser/webdata/web_database.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -51,7 +53,6 @@ using browser_sync::AutofillChangeProcessor;
using browser_sync::AutofillDataTypeController;
using browser_sync::AutofillProfileDataTypeController;
using browser_sync::AutofillModelAssociator;
-using browser_sync::AutofillProfileSyncableService;
using browser_sync::BookmarkChangeProcessor;
using browser_sync::BookmarkDataTypeController;
using browser_sync::BookmarkModelAssociator;
@@ -223,8 +224,8 @@ ProfileSyncFactoryImpl::CreateAutofillProfileSyncComponents(
WebDatabase* web_database,
browser_sync::UnrecoverableErrorHandler* error_handler) {
AutofillProfileSyncableService* sync_service =
- new AutofillProfileSyncableService(web_database,
- profile_sync_service->profile());
+ web_database->GetAutofillTable()->GetSyncableService(
+ web_database, profile_sync_service->profile());
sync_api::UserShare* user_share = profile_sync_service->GetUserShare();
GenericChangeProcessor* change_processor =
new GenericChangeProcessor(sync_service, error_handler, user_share);

Powered by Google App Engine
This is Rietveld 408576698