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

Unified Diff: chrome/browser/webdata/web_data_service.cc

Issue 12330073: Disable ProfileKeyedServices on import process by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 7 years, 10 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 | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/web_data_service.cc
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc
index f36d92a52e76f007b1fbb7b57c1186bcf0f1580f..551251a7e13acb5da969d0211759d2757f602362 100644
--- a/chrome/browser/webdata/web_data_service.cc
+++ b/chrome/browser/webdata/web_data_service.cc
@@ -87,10 +87,14 @@ WebDataService::WebDataService()
failed_init_(false),
should_commit_(false),
main_loop_(MessageLoop::current()) {
+ // WebDataService takes ownership of a non-sharable resource (Web Data DB
+ // file) and so should never be launched on the import process, as it can
+ // grab the resource before the main browser process does.
+ CHECK(!ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess()));
gab 2013/03/07 15:46:57 FWIW, we (me and macourteau) were hitting the DCHE
+
// WebDataService requires DB thread if instantiated.
// Set WebDataServiceFactory::GetInstance()->SetTestingFactory(&profile, NULL)
// if you do not want to instantiate WebDataService in your test.
- DCHECK(!ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess()));
DCHECK(BrowserThread::IsWellKnownThread(BrowserThread::DB));
}
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698