| 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..c15d12b86fe00753df6d2110828f2d0337db4668 100644
|
| --- a/chrome/browser/webdata/web_database_service.h
|
| +++ b/chrome/browser/webdata/web_database_service.h
|
| @@ -41,7 +41,10 @@ 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,7 +53,10 @@ 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.
|
| + virtual void AddTable(scoped_ptr<WebDatabaseTable> table);
|
|
|
| // Initializes the web database service. Takes a callback which will return
|
| // the status of the DB after the init.
|
| @@ -84,6 +90,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
|
|
|