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

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

Issue 10873022: Revert 152904 - Moving FaviconService to a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 152958)
+++ chrome/browser/ui/cocoa/history_menu_bridge.mm (working copy)
@@ -12,7 +12,6 @@
#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"
@@ -453,9 +452,9 @@
void HistoryMenuBridge::GetFaviconForHistoryItem(HistoryItem* item) {
FaviconService* service =
- FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS);
+ profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
FaviconService::Handle handle = service->GetFaviconForURL(
- profile_, item->url, history::FAVICON, &favicon_consumer_,
+ item->url, history::FAVICON, &favicon_consumer_,
base::Bind(&HistoryMenuBridge::GotFaviconData, base::Unretained(this)));
favicon_consumer_.SetClientData(service, handle, item);
item->icon_handle = handle;
@@ -469,8 +468,7 @@
HistoryItem* item =
favicon_consumer_.GetClientData(
- FaviconServiceFactory::GetForProfile(
- profile_, Profile::EXPLICIT_ACCESS), handle);
+ profile_->GetFaviconService(Profile::EXPLICIT_ACCESS), handle);
DCHECK(item);
item->icon_requested = false;
item->icon_handle = 0;
@@ -493,8 +491,8 @@
void HistoryMenuBridge::CancelFaviconRequest(HistoryItem* item) {
DCHECK(item);
if (item->icon_requested) {
- FaviconService* service = FaviconServiceFactory::GetForProfile(
- profile_, Profile::EXPLICIT_ACCESS);
+ FaviconService* service =
+ profile_->GetFaviconService(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