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

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

Issue 10857037: Make FaviconService a ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the tests 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
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 388b4528ab31d4f954d8334d1a59be1f88de0860..e7c6083c1d229b1e3407a8dbb97c58b97d2fe8c3 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -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"
@@ -256,14 +257,13 @@ TestingProfile::~TestingProfile() {
host_content_settings_map_->ShutdownOnUIThread();
DestroyTopSites();
- DestroyFaviconService();
if (pref_proxy_config_tracker_.get())
pref_proxy_config_tracker_->DetachFromPrefService();
}
void TestingProfile::CreateFaviconService() {
- favicon_service_.reset(new FaviconService(this));
+ FaviconServiceFactory::GetInstance();
}
static scoped_refptr<RefcountedProfileKeyedService> BuildHistoryService(
@@ -331,10 +331,6 @@ void TestingProfile::DestroyTopSites() {
}
}
-void TestingProfile::DestroyFaviconService() {
- favicon_service_.reset();
-}
-
static ProfileKeyedService* BuildBookmarkModel(Profile* profile) {
BookmarkModel* bookmark_model = new BookmarkModel(profile);
bookmark_model->Load();
@@ -476,7 +472,7 @@ TestingProfile::GetExtensionSpecialStoragePolicy() {
}
FaviconService* TestingProfile::GetFaviconService(ServiceAccessType access) {
- return favicon_service_.get();
+ return FaviconServiceFactory::GetForProfile(this);
}
HistoryService* TestingProfile::GetHistoryService(ServiceAccessType access) {
« chrome/browser/profiles/profile_impl.cc ('K') | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698