Index: chrome/test/base/testing_profile.cc |
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc |
index d5e6b7a6690d3ff9e8082eb41cf744dd27b104b8..90bdaa1a986b6bae04a86e2454b075e87f27c32f 100644 |
--- a/chrome/test/base/testing_profile.cc |
+++ b/chrome/test/base/testing_profile.cc |
@@ -426,6 +426,7 @@ void TestingProfile::CreateFaviconService() { |
} |
static KeyedService* BuildHistoryService(content::BrowserContext* profile) { |
+ // TODO(sdefresne): should we also create a ChromeHistoryClient? |
return new HistoryService(NULL, static_cast<Profile*>(profile)); |
} |
@@ -441,9 +442,7 @@ bool TestingProfile::CreateHistoryService(bool delete_file, bool no_db) { |
HistoryService* history_service = static_cast<HistoryService*>( |
HistoryServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
this, BuildHistoryService)); |
- if (!history_service->Init(this->GetPath(), |
- BookmarkModelFactory::GetForProfile(this), |
- no_db)) { |
+ if (!history_service->Init(this->GetPath(), no_db)) { |
HistoryServiceFactory::GetInstance()->SetTestingFactoryAndUse(this, NULL); |
} |
// Disable WebHistoryService by default, since it makes network requests. |
@@ -513,18 +512,8 @@ void TestingProfile::CreateBookmarkModel(bool delete_file) { |
base::DeleteFile(path, false); |
} |
// This will create a bookmark model. |
- BookmarkModel* bookmark_service = |
- static_cast<ChromeBookmarkClient*>( |
- BookmarkModelFactory::GetInstance()->SetTestingFactoryAndUse( |
- this, BuildBookmarkModel))->model(); |
- |
- HistoryService* history_service = |
- HistoryServiceFactory::GetForProfileWithoutCreating(this); |
- if (history_service) { |
- history_service->history_backend_->bookmark_service_ = bookmark_service; |
blundell
2014/06/02 09:39:30
I think that you should create and wire up a Chrom
sdefresne
2014/06/02 12:59:12
Done.
|
- history_service->history_backend_->expirer_.bookmark_service_ = |
- bookmark_service; |
- } |
+ BookmarkModelFactory::GetInstance()->SetTestingFactoryAndUse( |
+ this, BuildBookmarkModel); |
} |
static KeyedService* BuildWebDataService(content::BrowserContext* profile) { |