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

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

Issue 16938006: Adds RefCountedDeleteOnMessageLoop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update the gyp file Created 7 years, 6 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 67e95e735081df4c9a1044b1239d0d2cbcf934f7..65cbe6e6b6becbb5e696aba7db9c9966ae45e6d4 100644
--- a/components/webdata/common/web_database_service.h
+++ b/components/webdata/common/web_database_service.h
@@ -14,8 +14,10 @@
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/ref_counted_delete_on_message_loop.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/message_loop/message_loop_proxy.h"
#include "base/observer_list.h"
#include "components/webdata/common/web_data_service_base.h"
#include "components/webdata/common/web_database.h"
@@ -45,15 +47,14 @@ class WebDataServiceConsumer;
////////////////////////////////////////////////////////////////////////////////
class WEBDATA_EXPORT WebDatabaseService
- : public base::RefCountedThreadSafe<
- WebDatabaseService,
- content::BrowserThread::DeleteOnUIThread> {
+ : public base::RefCountedDeleteOnMessageLoop<WebDatabaseService> {
public:
typedef base::Callback<scoped_ptr<WDTypedResult>(WebDatabase*)> ReadTask;
typedef base::Callback<WebDatabase::State(WebDatabase*)> WriteTask;
// Takes the path to the WebDatabase file.
- explicit WebDatabaseService(const base::FilePath& path);
+ WebDatabaseService(const base::FilePath& path,
+ const scoped_refptr<base::MessageLoopProxy>& ui_thread);
// Adds |table| as a WebDatabaseTable that will participate in
// managing the database, transferring ownership. All calls to this
@@ -112,13 +113,9 @@ class WEBDATA_EXPORT WebDatabaseService
private:
class BackendDelegate;
- friend struct content::BrowserThread::DeleteOnThread<
- content::BrowserThread::UI>;
- friend class base::DeleteHelper<WebDatabaseService>;
- // We have to friend RCTS<> so WIN shared-lib build is happy (crbug/112250).
- friend class base::RefCountedThreadSafe<WebDatabaseService,
- content::BrowserThread::DeleteOnUIThread>;
friend class BackendDelegate;
+ friend class base::RefCountedDeleteOnMessageLoop<WebDatabaseService>;
+ friend class base::DeleteHelper<WebDatabaseService>;
virtual ~WebDatabaseService();
« no previous file with comments | « components/autofill/browser/webdata/web_data_service_unittest.cc ('k') | components/webdata/common/web_database_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698