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

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

Issue 16174013: Remove dependency of WebData on content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments 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_data_service_backend.h
diff --git a/components/webdata/common/web_data_service_backend.h b/components/webdata/common/web_data_service_backend.h
index c12ade6edaf0b6d9c90eec71f2608cbcc18013a7..3a6fe6fc91f2687dbc2ba7992c46a6cd9b2053ed 100644
--- a/components/webdata/common/web_data_service_backend.h
+++ b/components/webdata/common/web_data_service_backend.h
@@ -10,12 +10,11 @@
#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/scoped_vector.h"
#include "components/webdata/common/web_database_service.h"
#include "components/webdata/common/webdata_export.h"
-#include "content/public/browser/browser_thread.h"
-
class WebDatabase;
class WebDatabaseTable;
@@ -33,9 +32,7 @@ class Location;
// TODO(caitkp): Rename this class to WebDatabaseBackend.
class WEBDATA_EXPORT WebDataServiceBackend
- : public base::RefCountedThreadSafe<
- WebDataServiceBackend,
- content::BrowserThread::DeleteOnDBThread> {
+ : public base::RefCountedDeleteOnMessageLoop<WebDataServiceBackend> {
public:
class Delegate {
public:
@@ -45,8 +42,9 @@ class WEBDATA_EXPORT WebDataServiceBackend
virtual void DBLoaded(sql::InitStatus status) = 0;
};
- explicit WebDataServiceBackend(const base::FilePath& path,
- Delegate* delegate);
+ WebDataServiceBackend(const base::FilePath& path,
+ Delegate* delegate,
+ const scoped_refptr<base::MessageLoopProxy>& db_thread);
// Must call only before InitDatabaseWithCallback.
void AddTable(scoped_ptr<WebDatabaseTable> table);
@@ -88,17 +86,12 @@ class WEBDATA_EXPORT WebDataServiceBackend
WebDatabase* database() { return db_.get(); }
protected:
+ friend class base::RefCountedDeleteOnMessageLoop<WebDataServiceBackend>;
+ friend class base::DeleteHelper<WebDataServiceBackend>;
+
virtual ~WebDataServiceBackend();
private:
- friend struct content::BrowserThread::DeleteOnThread<
- content::BrowserThread::DB>;
- friend class base::DeleteHelper<WebDataServiceBackend>;
- // We have to friend RCTS<> so WIN shared-lib build is happy
- // (http://crbug/112250).
- friend class base::RefCountedThreadSafe<WebDataServiceBackend,
- content::BrowserThread::DeleteOnDBThread>;
-
// Commit the current transaction.
void Commit();
« no previous file with comments | « components/webdata/common/web_data_request_manager.h ('k') | components/webdata/common/web_data_service_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698