Chromium Code Reviews| Index: chrome/test/base/testing_profile.cc |
| diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc |
| index f77bdee6c570c22e738017d1224ebc2b98dd0962..2f290512c0ececce06fd5f45d8199d14d613b5ef 100644 |
| --- a/chrome/test/base/testing_profile.cc |
| +++ b/chrome/test/base/testing_profile.cc |
| @@ -19,6 +19,8 @@ |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/favicon/chrome_favicon_client_factory.h" |
| +#include "chrome/browser/favicon/fallback_icon_service.h" |
| +#include "chrome/browser/favicon/fallback_icon_service_factory.h" |
| #include "chrome/browser/favicon/favicon_service.h" |
| #include "chrome/browser/favicon/favicon_service_factory.h" |
| #include "chrome/browser/history/chrome_history_client.h" |
| @@ -211,6 +213,13 @@ KeyedService* CreateTestDesktopNotificationService( |
| } |
| #endif |
| +KeyedService* BuildFallbackIconService(content::BrowserContext* profile) { |
| + FallbackIconClient* fallback_icon_client = |
| + ChromeFallbackIconClientFactory::GetForProfile( |
| + static_cast<Profile*>(profile)); |
|
sdefresne
2015/03/17 09:41:52
nit: Profile::FromBrowserContext(profile)
huangs
2015/03/23 03:28:35
Done.
|
| + return new FallbackIconService(fallback_icon_client); |
| +} |
| + |
| KeyedService* BuildFaviconService(content::BrowserContext* profile) { |
| FaviconClient* favicon_client = |
| ChromeFaviconClientFactory::GetForProfile(static_cast<Profile*>(profile)); |
| @@ -554,6 +563,11 @@ TestingProfile::~TestingProfile() { |
| } |
| } |
| +void TestingProfile::CreateFallbackIconService() { |
| + FaviconServiceFactory::GetInstance()->SetTestingFactory( |
| + this, BuildFallbackIconService); |
| +} |
| + |
| void TestingProfile::CreateFaviconService() { |
| // It is up to the caller to create the history service if one is needed. |
| FaviconServiceFactory::GetInstance()->SetTestingFactory( |