Index: components/webdata/common/web_database_service.cc |
diff --git a/components/webdata/common/web_database_service.cc b/components/webdata/common/web_database_service.cc |
index 88a7c8934c204d03f636e5b8c058d40031340a33..6da199971ef137313bad7749c7534bb5f057b26e 100644 |
--- a/components/webdata/common/web_database_service.cc |
+++ b/components/webdata/common/web_database_service.cc |
@@ -38,12 +38,14 @@ class WebDatabaseService::BackendDelegate : |
}; |
WebDatabaseService::WebDatabaseService( |
- const base::FilePath& path) |
- : path_(path), |
+ const base::FilePath& path, |
+ const scoped_refptr<base::MessageLoopProxy>& ui_thread) |
+ : base::RefCountedDeleteOnMessageLoop<WebDatabaseService>(ui_thread), |
+ path_(path), |
weak_ptr_factory_(this), |
db_loaded_(false) { |
// WebDatabaseService should be instantiated on UI thread. |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK(ui_thread->BelongsToCurrentThread()); |
// WebDatabaseService requires DB thread if instantiated. |
DCHECK(BrowserThread::IsWellKnownThread(BrowserThread::DB)); |
} |