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

Unified Diff: chrome/browser/webdata/autofill_profile_syncable_service.h

Issue 8065016: [Sync] Refactor non-frontend DTC to handle new API properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try harder trybot (rebase). 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/webdata/autofill_profile_syncable_service.h
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.h b/chrome/browser/webdata/autofill_profile_syncable_service.h
index 77ef314bbc5ee5bf1191940d2a95623b838f4244..044a63275f2e54562cce6edc6d67567dabd44200 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.h
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_vector.h"
+#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/sync/api/sync_change.h"
@@ -41,6 +42,7 @@ class UnrecoverableErrorHandler;
// ProcessSyncChanges() and for each local change Observe() is called.
class AutofillProfileSyncableService
: public SyncableService,
+ public base::SupportsWeakPtr<AutofillProfileSyncableService>,
public NotificationObserver,
public base::NonThreadSafe {
public:
@@ -130,7 +132,7 @@ class AutofillProfileSyncableService
// For unit-tests.
AutofillProfileSyncableService();
void set_sync_processor(SyncChangeProcessor* sync_processor) {
- sync_processor_ = sync_processor;
+ sync_processor_.reset(sync_processor);
}
WebDataService* web_data_service_; // WEAK
@@ -141,7 +143,7 @@ class AutofillProfileSyncableService
ScopedVector<AutofillProfile> profiles_;
GUIDToProfileMap profiles_map_;
- SyncChangeProcessor* sync_processor_;
+ scoped_ptr<SyncChangeProcessor> sync_processor_;
DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncableService);
};

Powered by Google App Engine
This is Rietveld 408576698