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

Unified Diff: chrome/browser/bookmarks/bookmark_model.cc

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/bookmarks/bookmark_model.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_model.cc (revision 152958)
+++ chrome/browser/bookmarks/bookmark_model.cc (working copy)
@@ -18,7 +18,6 @@
#include "chrome/browser/bookmarks/bookmark_storage.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -780,8 +779,7 @@
history::FaviconData favicon) {
BookmarkNode* node =
load_consumer_.GetClientData(
- FaviconServiceFactory::GetForProfile(
- profile_, Profile::EXPLICIT_ACCESS), handle);
+ profile_->GetFaviconService(Profile::EXPLICIT_ACCESS), handle);
DCHECK(node);
node->set_favicon_load_handle(0);
if (favicon.is_valid()) {
@@ -800,12 +798,12 @@
return;
DCHECK(node->url().is_valid());
- FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
- profile_, Profile::EXPLICIT_ACCESS);
+ FaviconService* favicon_service =
+ profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
if (!favicon_service)
return;
FaviconService::Handle handle = favicon_service->GetFaviconForURL(
- profile_, node->url(), history::FAVICON, &load_consumer_,
+ node->url(), history::FAVICON, &load_consumer_,
base::Bind(&BookmarkModel::OnFaviconDataAvailable,
base::Unretained(this)));
load_consumer_.SetClientData(favicon_service, handle, node);
@@ -819,8 +817,8 @@
void BookmarkModel::CancelPendingFaviconLoadRequests(BookmarkNode* node) {
if (node->favicon_load_handle()) {
- FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
- profile_, Profile::EXPLICIT_ACCESS);
+ FaviconService* favicon_service =
+ profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
if (favicon_service)
favicon_service->CancelRequest(node->favicon_load_handle());
node->set_favicon_load_handle(0);
« no previous file with comments | « chrome/browser/bookmarks/bookmark_html_writer_unittest.cc ('k') | chrome/browser/favicon/favicon_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698