Commit 325a0209 authored by jif@chromium.org's avatar jif@chromium.org

Remove stale include of cancelable_request.h.

The FaviconService is not a CancelableRequestProvider anymore.
Fixed external classes that were incorrectly using "Handle", a type inherited from CancelableRequestProvider.

BUG=359599

Review URL: https://codereview.chromium.org/230873003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263063 0039d316-1c4b-4281-b951-d872f2087c98
parent 1e90a850
......@@ -1015,14 +1015,15 @@ void BookmarkModel::LoadFavicon(BookmarkNode* node) {
profile_, Profile::EXPLICIT_ACCESS);
if (!favicon_service)
return;
FaviconService::Handle handle = favicon_service->GetFaviconImageForURL(
FaviconService::FaviconForURLParams(node->url(),
chrome::FAVICON,
gfx::kFaviconSize),
base::Bind(&BookmarkModel::OnFaviconDataAvailable,
base::Unretained(this), node),
&cancelable_task_tracker_);
node->set_favicon_load_task_id(handle);
base::CancelableTaskTracker::TaskId taskId =
favicon_service->GetFaviconImageForURL(
FaviconService::FaviconForURLParams(
node->url(), chrome::FAVICON, gfx::kFaviconSize),
base::Bind(&BookmarkModel::OnFaviconDataAvailable,
base::Unretained(this),
node),
&cancelable_task_tracker_);
node->set_favicon_load_task_id(taskId);
}
void BookmarkModel::FaviconLoaded(const BookmarkNode* node) {
......
......@@ -5,7 +5,9 @@
#ifndef CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_
#define CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_
#include <deque>
#include <map>
#include <vector>
#include "base/basictypes.h"
#include "base/callback_forward.h"
......
......@@ -11,7 +11,6 @@
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/common/cancelable_request.h"
#include "chrome/common/favicon/favicon_types.h"
#include "chrome/common/ref_counted_util.h"
#include "components/keyed_service/core/keyed_service.h"
......@@ -28,10 +27,7 @@ struct FaviconImageResult;
// The favicon service provides methods to access favicons. It calls the history
// backend behind the scenes.
//
// This service is thread safe. Each request callback is invoked in the
// thread that made the request.
class FaviconService : public CancelableRequestProvider, public KeyedService {
class FaviconService : public KeyedService {
public:
explicit FaviconService(Profile* profile);
......
......@@ -12,6 +12,7 @@
#include "base/values.h"
#include "chrome/browser/extensions/extension_icon_manager.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/profiles/profile.h"
......
......@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/common/favicon/favicon_types.h"
#include "content/public/browser/web_ui_message_handler.h"
class ExtensionIconColorManager;
......@@ -41,9 +41,8 @@ class FaviconWebUIHandler : public content::WebUIMessageHandler {
private:
// Called when favicon data is available from the history backend.
void OnFaviconDataAvailable(
FaviconService::Handle request_handle,
const chrome::FaviconBitmapResult& bitmap_result);
void OnFaviconDataAvailable(int request_handle,
const chrome::FaviconBitmapResult& bitmap_result);
base::CancelableTaskTracker cancelable_task_tracker_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment