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

Unified Diff: chrome/browser/webdata/web_database_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/web_database_service.h
diff --git a/chrome/browser/webdata/web_database_service.h b/chrome/browser/webdata/web_database_service.h
index 75a4f4d81d6b0860169d84f2f098a8362929cef5..9493e4f7892b575989d3884a32ba4f6119fa63a3 100644
--- a/chrome/browser/webdata/web_database_service.h
+++ b/chrome/browser/webdata/web_database_service.h
@@ -41,7 +41,8 @@ class WebDataServiceConsumer;
//
////////////////////////////////////////////////////////////////////////////////
-class WebDatabaseService {
+class WebDatabaseService : public base::RefCountedThreadSafe<WebDatabaseService,
+ content::BrowserThread::DeleteOnUIThread> {
public:
typedef base::Callback<scoped_ptr<WDTypedResult>(WebDatabase*)> ReadTask;
typedef base::Callback<WebDatabase::State(WebDatabase*)> WriteTask;
@@ -50,8 +51,6 @@ class WebDatabaseService {
// Takes the path to the WebDatabase file.
explicit WebDatabaseService(const base::FilePath& path);
- virtual ~WebDatabaseService();
-
// Initializes the web database service. Takes a callback which will return
// the status of the DB after the init.
virtual void LoadDatabase(const InitCallback& callback);
@@ -84,6 +83,12 @@ class WebDatabaseService {
virtual void CancelRequest(WebDataServiceBase::Handle h);
private:
+ friend struct content::BrowserThread::DeleteOnThread<
+ content::BrowserThread::UI>;
+ friend class base::DeleteHelper<WebDatabaseService>;
+
+ virtual ~WebDatabaseService();
+
base::FilePath path_;
// The primary owner is |WebDatabaseService| but is refcounted because

Powered by Google App Engine
This is Rietveld 408576698