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

Unified Diff: components/autofill/browser/webdata/autofill_webdata_service.h

Issue 14679005: Create an AutofillBackend interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert delegate to interface Created 7 years, 7 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: components/autofill/browser/webdata/autofill_webdata_service.h
diff --git a/components/autofill/browser/webdata/autofill_webdata_service.h b/components/autofill/browser/webdata/autofill_webdata_service.h
index 87b967ca94bb2283270198968fe60b21399cfbf4..7df052fad11debf6c44cb0f7d299d0f47192cb8d 100644
--- a/components/autofill/browser/webdata/autofill_webdata_service.h
+++ b/components/autofill/browser/webdata/autofill_webdata_service.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/supports_user_data.h"
#include "components/autofill/browser/webdata/autofill_webdata.h"
@@ -31,6 +32,7 @@ class AutofillWebDataBackend;
class AutofillWebDataServiceObserverOnDBThread;
class AutofillWebDataServiceObserverOnUIThread;
class CreditCard;
+class SyncableServiceBackend;
// API for Autofill web data.
class AutofillWebDataService : public AutofillWebData,
@@ -96,11 +98,17 @@ class AutofillWebDataService : public AutofillWebData,
// |ShutdownOnUIThread()| is called.
base::SupportsUserData* GetDBUserData();
+ void GetSyncableBackend(
Jói 2013/05/07 19:39:41 Needs documentation.
Cait (Slow) 2013/05/07 20:14:56 Done.
+ const base::Callback<void(SyncableServiceBackend*)>& callback);
protected:
virtual ~AutofillWebDataService();
virtual void ShutdownOnDBThread();
+ // This factory is used on the UIThread. All vended weak pointers are
+ // invalidated in ShutdownOnUIThread().
+ base::WeakPtrFactory<AutofillWebDataService> weak_ptr_factory_;
+
private:
// This makes the destructor public, and thus allows us to aggregate
// SupportsUserData. It is private by default to prevent incorrect

Powered by Google App Engine
This is Rietveld 408576698