Index: chrome/test/base/testing_profile.cc |
=================================================================== |
--- chrome/test/base/testing_profile.cc (revision 151481) |
+++ chrome/test/base/testing_profile.cc (working copy) |
@@ -319,17 +319,22 @@ |
path = path.Append(chrome::kHistoryFilename); |
file_util::Delete(path, false); |
} |
- // This will create and init the history service. |
HistoryService* history_service = static_cast<HistoryService*>( |
HistoryServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
this, BuildHistoryService).get()); |
- if (!history_service->Init(this->GetPath(), |
- BookmarkModelFactory::GetForProfile(this), |
- no_db)) { |
+ if (!InitHistoryService(history_service, no_db)) |
HistoryServiceFactory::GetInstance()->SetTestingFactoryAndUse(this, NULL); |
- } |
} |
+bool TestingProfile::InitHistoryService(HistoryService* history_service, |
+ bool no_db) { |
+ DCHECK(history_service); |
+ // By default, disable the InMemoryURLIndex's cache database. |
+ return history_service->Init(GetPath(), |
+ BookmarkModelFactory::GetForProfile(this), |
+ no_db, true); |
+} |
+ |
void TestingProfile::DestroyHistoryService() { |
scoped_refptr<HistoryService> history_service = |
HistoryServiceFactory::GetForProfileWithoutCreating(this); |