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

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: Merge to ToT Created 7 years, 9 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: 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 8ebc206ac0b350b30c9e619f9706d5fceb6d00c5..020039d86077b912df3360f38be1e3b1bd2faa3f 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 should not be instantiated on the ImportProcess, because
+ // the Web Data file cannot be shared, and opening it will cause the main
+ // process to fail to open the profile.
+ CHECK(!ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess()));
+
// 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));
}

Powered by Google App Engine
This is Rietveld 408576698