| Index: chrome/test/base/testing_profile.cc
|
| ===================================================================
|
| --- chrome/test/base/testing_profile.cc (revision 152993)
|
| +++ chrome/test/base/testing_profile.cc (working copy)
|
| @@ -24,6 +24,7 @@
|
| #include "chrome/browser/extensions/extension_system_factory.h"
|
| #include "chrome/browser/extensions/test_extension_system.h"
|
| #include "chrome/browser/favicon/favicon_service.h"
|
| +#include "chrome/browser/favicon/favicon_service_factory.h"
|
| #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
|
| #include "chrome/browser/history/history.h"
|
| #include "chrome/browser/history/history_backend.h"
|
| @@ -297,14 +298,20 @@
|
| host_content_settings_map_->ShutdownOnUIThread();
|
|
|
| DestroyTopSites();
|
| - DestroyFaviconService();
|
|
|
| if (pref_proxy_config_tracker_.get())
|
| pref_proxy_config_tracker_->DetachFromPrefService();
|
| }
|
|
|
| +static ProfileKeyedService* BuildFaviconService(Profile* profile) {
|
| + return new FaviconService(
|
| + HistoryServiceFactory::GetForProfileWithoutCreating(profile));
|
| +}
|
| +
|
| void TestingProfile::CreateFaviconService() {
|
| - favicon_service_.reset(new FaviconService(this));
|
| + // It is up to the caller to create the history service if one is needed.
|
| + FaviconServiceFactory::GetInstance()->SetTestingFactory(
|
| + this, BuildFaviconService);
|
| }
|
|
|
| static scoped_refptr<RefcountedProfileKeyedService> BuildHistoryService(
|
| @@ -372,10 +379,6 @@
|
| }
|
| }
|
|
|
| -void TestingProfile::DestroyFaviconService() {
|
| - favicon_service_.reset();
|
| -}
|
| -
|
| static ProfileKeyedService* BuildBookmarkModel(Profile* profile) {
|
| BookmarkModel* bookmark_model = new BookmarkModel(profile);
|
| bookmark_model->Load();
|
| @@ -520,10 +523,6 @@
|
| return extension_special_storage_policy_.get();
|
| }
|
|
|
| -FaviconService* TestingProfile::GetFaviconService(ServiceAccessType access) {
|
| - return favicon_service_.get();
|
| -}
|
| -
|
| net::CookieMonster* TestingProfile::GetCookieMonster() {
|
| if (!GetRequestContext())
|
| return NULL;
|
|
|