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, |