Index: chrome/test/base/testing_profile.cc |
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc |
index 4f0158d6d573862e37afa00800bc0d9fcac4428d..0cf80a65fc74d0c2aa3db6e7c8d78228d3b35b46 100644 |
--- a/chrome/test/base/testing_profile.cc |
+++ b/chrome/test/base/testing_profile.cc |
@@ -17,6 +17,7 @@ |
#include "chrome/browser/autocomplete/autocomplete_classifier.h" |
#include "chrome/browser/bookmarks/bookmark_model_factory.h" |
#include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
+#include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/chrome_notification_types.h" |
#include "chrome/browser/content_settings/host_content_settings_map.h" |
@@ -498,15 +499,16 @@ void TestingProfile::DestroyTopSites() { |
static KeyedService* BuildBookmarkModel(content::BrowserContext* context) { |
Profile* profile = static_cast<Profile*>(context); |
ChromeBookmarkClient* bookmark_client = |
- new ChromeBookmarkClient(profile, false); |
- bookmark_client->model()->Load( |
- profile->GetPrefs(), |
- profile->GetPrefs()->GetString(prefs::kAcceptLanguages), |
- profile->GetPath(), |
- profile->GetIOTaskRunner(), |
- content::BrowserThread::GetMessageLoopProxyForThread( |
- content::BrowserThread::UI)); |
- return bookmark_client; |
+ ChromeBookmarkClientFactory::GetForProfile(profile); |
+ BookmarkModel* bookmark_model = new BookmarkModel(bookmark_client, false); |
+ bookmark_client->Init(bookmark_model); |
+ bookmark_model->Load(profile->GetPrefs(), |
+ profile->GetPrefs()->GetString(prefs::kAcceptLanguages), |
+ profile->GetPath(), |
+ profile->GetIOTaskRunner(), |
+ content::BrowserThread::GetMessageLoopProxyForThread( |
+ content::BrowserThread::UI)); |
+ return bookmark_model; |
} |
static KeyedService* BuildChromeHistoryClient( |