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

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

Issue 12695015: Split Autofill webdata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/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 c55cec53b6d8dd359f379f131e7416af33c5ef74..2c4b93b794f00d587ad2057196efd26b5555953a 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.h
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_vector.h"
+#include "base/supports_user_data.h"
#include "base/synchronization/lock.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/webdata/autofill_change.h"
@@ -29,6 +30,7 @@ class AutofillTable;
class FormGroup;
class ProfileSyncServiceAutofillTest;
class WebDataService;
+class WebDataServiceBase;
extern const char kAutofillProfileTag[];
@@ -37,13 +39,23 @@ extern const char kAutofillProfileTag[];
// local->cloud syncs. Then for each cloud change we receive
// ProcessSyncChanges() and for each local change Observe() is called.
class AutofillProfileSyncableService
- : public syncer::SyncableService,
+ : public base::SupportsUserData::Data,
+ public syncer::SyncableService,
public content::NotificationObserver,
public base::NonThreadSafe {
public:
- explicit AutofillProfileSyncableService(WebDataService* web_data_service);
virtual ~AutofillProfileSyncableService();
+ // TODO(joi): Change this to key off AutofillWebDataService instead
+ // of WebDataService, once it is truly separate.
+
+ // Creates a new AutofillProfileSyncableService and hangs it off of
+ // |web_data|, which takes ownership.
+ static void CreateForWebDataService(WebDataService* web_data);
+ // Retrieves the AutofillProfileSyncableService stored on |web_data|.
+ static AutofillProfileSyncableService* FromWebDataService(
+ WebDataService* web_data);
+
static syncer::ModelType model_type() { return syncer::AUTOFILL_PROFILE; }
// syncer::SyncableService implementation.
@@ -65,6 +77,8 @@ class AutofillProfileSyncableService
const content::NotificationDetails& details) OVERRIDE;
protected:
+ explicit AutofillProfileSyncableService(WebDataService* web_data_service);
+
// A convenience wrapper of a bunch of state we pass around while
// associating models, and send to the WebDatabase for persistence.
// We do this so we hold the write lock for only a small period.

Powered by Google App Engine
This is Rietveld 408576698