Chromium Code Reviews| 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 e7587e680af97891465f28a45c02209d051ac27f..87827536d758ca8ce289f997809e8638c9a155b5 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> { |
|
Jói
2013/03/20 23:09:10
nit: Indentation of the template parameters; would
Cait (Slow)
2013/03/21 23:23:27
Done.
|
| 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(); |
| - |
| // Adds |table| as a WebDatabaseTable that will participate in |
| // managing the database, transferring ownership. All calls to this |
| // method must be made before |LoadDatabase| is called. |
| @@ -89,6 +88,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 |