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

Unified Diff: components/webdata/common/web_database_service.h

Issue 14679005: Create an AutofillBackend interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up 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/webdata/common/web_database_service.h
diff --git a/components/webdata/common/web_database_service.h b/components/webdata/common/web_database_service.h
index 1bdfca8504edc317b12d9360a1082f07262fc8f3..6ba498ec49c0bd768c6d79743d8e73e521ef2759 100644
--- a/components/webdata/common/web_database_service.h
+++ b/components/webdata/common/web_database_service.h
@@ -51,6 +51,7 @@ class WEBDATA_EXPORT WebDatabaseService
public:
typedef base::Callback<scoped_ptr<WDTypedResult>(WebDatabase*)> ReadTask;
typedef base::Callback<WebDatabase::State(WebDatabase*)> WriteTask;
+ typedef base::Callback<void(WebDatabase*)> DBCallback;
// Takes the path to the WebDatabase file.
explicit WebDatabaseService(const base::FilePath& path);
@@ -75,6 +76,11 @@ class WEBDATA_EXPORT WebDatabaseService
// TODO(caitkp): remove this method once SyncServices no longer depend on it.
virtual WebDatabase* GetDatabaseOnDB() const;
+ // Asynchronously gets an instance of |WebDatabase|, which can be
+ // used to do work on the DB thread. This method is meant to be called from
+ // the UI thread, but the callback will be called on the DB thread.
+ void GetDatabaseOnDB(const DBCallback& callback);
Jói 2013/05/06 23:08:39 I'm wondering about naming here. The name could ea
+
// Schedule an update/write task on the DB thread.
virtual void ScheduleDBTask(
const tracked_objects::Location& from_here,

Powered by Google App Engine
This is Rietveld 408576698