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

Unified Diff: chrome/browser/ui/cocoa/history_menu_bridge.mm

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/ui/cocoa/history_menu_bridge.mm
===================================================================
--- chrome/browser/ui/cocoa/history_menu_bridge.mm (revision 152993)
+++ chrome/browser/ui/cocoa/history_menu_bridge.mm (working copy)
@@ -12,6 +12,7 @@
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU
#import "chrome/browser/app_controller_mac.h"
+#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/page_usage_data.h"
#include "chrome/browser/profiles/profile.h"
@@ -452,9 +453,9 @@
void HistoryMenuBridge::GetFaviconForHistoryItem(HistoryItem* item) {
FaviconService* service =
- profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
+ FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS);
FaviconService::Handle handle = service->GetFaviconForURL(
- item->url, history::FAVICON, &favicon_consumer_,
+ profile_, item->url, history::FAVICON, &favicon_consumer_,
base::Bind(&HistoryMenuBridge::GotFaviconData, base::Unretained(this)));
favicon_consumer_.SetClientData(service, handle, item);
item->icon_handle = handle;
@@ -468,7 +469,8 @@
HistoryItem* item =
favicon_consumer_.GetClientData(
- profile_->GetFaviconService(Profile::EXPLICIT_ACCESS), handle);
+ FaviconServiceFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS), handle);
DCHECK(item);
item->icon_requested = false;
item->icon_handle = 0;
@@ -491,8 +493,8 @@
void HistoryMenuBridge::CancelFaviconRequest(HistoryItem* item) {
DCHECK(item);
if (item->icon_requested) {
- FaviconService* service =
- profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
+ FaviconService* service = FaviconServiceFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
service->CancelRequest(item->icon_handle);
item->icon_requested = false;
item->icon_handle = 0;
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.cc ('k') | chrome/browser/ui/intents/web_intent_picker_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698