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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 10837244: Replace HistoryQuickProvider protobuf-based caching with an SQLite-based database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Tweak suppression. Created 8 years, 4 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/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);

Powered by Google App Engine
This is Rietveld 408576698