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

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

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
« no previous file with comments | « components/webdata/common/web_database_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « components/webdata/common/web_database_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698