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

Unified Diff: chrome/browser/sync/glue/session_model_associator.cc

Issue 10828263: Moving FaviconService to a ProfileKeyedService. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: resyncing with library after revert 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/browser/sync/glue/session_model_associator.cc
===================================================================
--- chrome/browser/sync/glue/session_model_associator.cc (revision 152993)
+++ chrome/browser/sync/glue/session_model_associator.cc (working copy)
@@ -13,6 +13,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -541,7 +542,7 @@
if (!command_line.HasSwitch(switches::kSyncTabFavicons))
return;
FaviconService* favicon_service =
- profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
+ FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS);
if (!favicon_service)
return;
SessionID::id_type tab_id = tab_link->tab()->GetSessionId();
@@ -551,7 +552,7 @@
}
DVLOG(1) << "Triggering favicon load for url " << tab_link->url().spec();
FaviconService::Handle handle = favicon_service->GetFaviconForURL(
- tab_link->url(), history::FAVICON, &load_consumer_,
+ profile_, tab_link->url(), history::FAVICON, &load_consumer_,
base::Bind(&SessionModelAssociator::OnFaviconDataAvailable,
AsWeakPtr()));
load_consumer_.SetClientData(favicon_service, handle, tab_id);
@@ -566,7 +567,8 @@
return;
SessionID::id_type tab_id =
load_consumer_.GetClientData(
- profile_->GetFaviconService(Profile::EXPLICIT_ACCESS), handle);
+ FaviconServiceFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS), handle);
TabLinksMap::iterator iter = tab_map_.find(tab_id);
if (iter == tab_map_.end()) {
DVLOG(1) << "Ignoring favicon for closed tab " << tab_id;
« no previous file with comments | « chrome/browser/sync/glue/bookmark_change_processor.cc ('k') | chrome/browser/ui/cocoa/history_menu_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698