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

Unified Diff: components/webdata/common/web_data_service_base.cc

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_base.cc
diff --git a/components/webdata/common/web_data_service_base.cc b/components/webdata/common/web_data_service_base.cc
index 6422cb46f1e4ed43204a569183fb7f165c360bec..496f723de1a1ebbf812ab9cbee504dc9bab7dc90 100644
--- a/components/webdata/common/web_data_service_base.cc
+++ b/components/webdata/common/web_data_service_base.cc
@@ -9,9 +9,6 @@
#include "base/stl_util.h"
#include "base/threading/thread.h"
#include "components/webdata/common/web_database_service.h"
-#ifdef DEBUG
-#include "content/public/browser/browser_thread.h"
-#endif
////////////////////////////////////////////////////////////////////////////////
//
@@ -21,16 +18,14 @@
using base::Bind;
using base::Time;
-using content::BrowserThread;
-WebDataServiceBase::WebDataServiceBase(scoped_refptr<WebDatabaseService> wdbs,
- const ProfileErrorCallback& callback)
- : wdbs_(wdbs),
+WebDataServiceBase::WebDataServiceBase(
+ scoped_refptr<WebDatabaseService> wdbs,
+ const ProfileErrorCallback& callback,
+ const scoped_refptr<base::MessageLoopProxy>& ui_thread)
+ : base::RefCountedDeleteOnMessageLoop<WebDataServiceBase>(ui_thread),
+ wdbs_(wdbs),
profile_error_callback_(callback) {
- // WebDataService requires DB thread if instantiated.
- // Set WebDataServiceFactory::GetInstance()->SetTestingFactory(&profile, NULL)
- // if you do not want to instantiate WebDataService in your test.
- DCHECK(BrowserThread::IsWellKnownThread(BrowserThread::DB));
}
void WebDataServiceBase::ShutdownOnUIThread() {
« no previous file with comments | « components/webdata/common/web_data_service_base.h ('k') | components/webdata/common/web_data_service_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698