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() { |