summaryrefslogtreecommitdiffstats
path: root/chrome/browser/webdata
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/webdata')
-rw-r--r--chrome/browser/webdata/autocomplete_syncable_service.cc5
-rw-r--r--chrome/browser/webdata/autocomplete_syncable_service.h4
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service.cc5
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service.h2
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc6
5 files changed, 13 insertions, 9 deletions
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.cc b/chrome/browser/webdata/autocomplete_syncable_service.cc
index af1cde1..3b3ecb1 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.
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.h b/chrome/browser/webdata/autocomplete_syncable_service.h
index 963a1ad..0c38849 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.h
+++ b/chrome/browser/webdata/autocomplete_syncable_service.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_
@@ -50,7 +50,7 @@ class AutocompleteSyncableService
virtual SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
const SyncDataList& initial_sync_data,
- SyncChangeProcessor* sync_processor) OVERRIDE;
+ scoped_ptr<SyncChangeProcessor> sync_processor) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE;
virtual SyncError ProcessSyncChanges(
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.cc b/chrome/browser/webdata/autofill_profile_syncable_service.cc
index f73a6618..fe1222d 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.cc
@@ -59,9 +59,10 @@ AutofillProfileSyncableService::AutofillProfileSyncableService()
SyncError AutofillProfileSyncableService::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());
DVLOG(1) << "Associating Autofill: MergeDataAndStartSyncing";
if (!LoadAutofillData(&profiles_.get())) {
@@ -84,7 +85,7 @@ SyncError AutofillProfileSyncableService::MergeDataAndStartSyncing(
}
}
- sync_processor_.reset(sync_processor);
+ sync_processor_ = sync_processor.Pass();
GUIDToProfileMap remaining_profiles;
CreateGUIDToProfileMap(profiles_.get(), &remaining_profiles);
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.h b/chrome/browser/webdata/autofill_profile_syncable_service.h
index 6926572..59c1e4a 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.h
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.h
@@ -51,7 +51,7 @@ class AutofillProfileSyncableService
virtual SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
const SyncDataList& initial_sync_data,
- SyncChangeProcessor* sync_processor) OVERRIDE;
+ scoped_ptr<SyncChangeProcessor> sync_processor) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE;
virtual SyncError ProcessSyncChanges(
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
index 147e2ef..11a4dc3 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
@@ -169,7 +169,8 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) {
// Takes ownership of sync_processor_.
autofill_syncable_service_.MergeDataAndStartSyncing(
- syncable::AUTOFILL_PROFILE, data_list, sync_processor_.release());
+ syncable::AUTOFILL_PROFILE, data_list,
+ sync_processor_.PassAs<SyncChangeProcessor>());
autofill_syncable_service_.StopSyncing(syncable::AUTOFILL_PROFILE);
}
@@ -199,7 +200,8 @@ TEST_F(AutofillProfileSyncableServiceTest, GetAllSyncData) {
SyncDataList data_list;
// Takes ownership of sync_processor_.
autofill_syncable_service_.MergeDataAndStartSyncing(
- syncable::AUTOFILL_PROFILE, data_list, sync_processor_.release());
+ syncable::AUTOFILL_PROFILE, data_list,
+ sync_processor_.PassAs<SyncChangeProcessor>());
SyncDataList data =
autofill_syncable_service_.GetAllSyncData(syncable::AUTOFILL_PROFILE);