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

Unified Diff: chrome/browser/webdata/autocomplete_syncable_service.cc

Issue 9749012: [Sync] Have SyncableService's take ownership of their SyncChangeProcessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict Created 8 years, 9 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/webdata/autocomplete_syncable_service.cc
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.cc b/chrome/browser/webdata/autocomplete_syncable_service.cc
index af1cde14a5b5d40e0d27e42a3d6dcf4f89693d82..3b3ecb1b2cb64812d766542376557fc7bcef1cc1 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.cc
+++ b/chrome/browser/webdata/autocomplete_syncable_service.cc
@@ -79,9 +79,10 @@ AutocompleteSyncableService::AutocompleteSyncableService()
SyncError AutocompleteSyncableService::MergeDataAndStartSyncing(
syncable::ModelType type,
const SyncDataList& initial_sync_data,
- SyncChangeProcessor* sync_processor) {
+ scoped_ptr<SyncChangeProcessor> sync_processor) {
DCHECK(CalledOnValidThread());
DCHECK(!sync_processor_.get());
+ DCHECK(sync_processor.get());
VLOG(1) << "Associating Autocomplete: MergeDataAndStartSyncing";
std::vector<AutofillEntry> entries;
@@ -97,7 +98,7 @@ SyncError AutocompleteSyncableService::MergeDataAndStartSyncing(
new_db_entries[it->key()] = std::make_pair(SyncChange::ACTION_ADD, it);
}
- sync_processor_.reset(sync_processor);
+ sync_processor_ = sync_processor.Pass();
std::vector<AutofillEntry> new_synced_entries;
// Go through and check for all the entries that sync already knows about.
« no previous file with comments | « chrome/browser/webdata/autocomplete_syncable_service.h ('k') | chrome/browser/webdata/autofill_profile_syncable_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698