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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 10857037: Make FaviconService a ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Override Shutdown() in FaviconService to NULL the profile_ pointer. 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 34b30d98b984260434fa7ceea8fdad6a210dfde3..01afa228c396a7392a8666c34df761a2ec834f43 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -40,7 +40,7 @@
#include "chrome/browser/extensions/extension_special_storage_policy.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/user_script_master.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_service_factory.h"
@@ -262,7 +262,6 @@ ProfileImpl::ProfileImpl(const FilePath& path,
new VisitedLinkEventListener(this))),
ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)),
host_content_settings_map_(NULL),
- favicon_service_created_(false),
start_time_(Time::Now()),
delegate_(delegate),
predictor_(NULL),
@@ -516,10 +515,6 @@ ProfileImpl::~ProfileImpl() {
if (top_sites_.get())
top_sites_->Shutdown();
- // FaviconService depends on HistoryServce so make sure we delete
- // HistoryService first.
- favicon_service_.reset();
-
if (pref_proxy_config_tracker_.get())
pref_proxy_config_tracker_->DetachFromPrefService();
@@ -716,11 +711,7 @@ content::ResourceContext* ProfileImpl::GetResourceContext() {
}
FaviconService* ProfileImpl::GetFaviconService(ServiceAccessType sat) {
- if (!favicon_service_created_) {
- favicon_service_created_ = true;
- favicon_service_.reset(new FaviconService(this));
- }
- return favicon_service_.get();
+ return FaviconServiceFactory::GetForProfile(this);
}
net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() {
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698