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) { ...@@ -1015,14 +1015,15 @@ void BookmarkModel::LoadFavicon(BookmarkNode* node) {
profile_, Profile::EXPLICIT_ACCESS); profile_, Profile::EXPLICIT_ACCESS);
if (!favicon_service) if (!favicon_service)
return; return;
FaviconService::Handle handle = favicon_service->GetFaviconImageForURL( base::CancelableTaskTracker::TaskId taskId =
FaviconService::FaviconForURLParams(node->url(), favicon_service->GetFaviconImageForURL(
chrome::FAVICON, FaviconService::FaviconForURLParams(
gfx::kFaviconSize), node->url(), chrome::FAVICON, gfx::kFaviconSize),
base::Bind(&BookmarkModel::OnFaviconDataAvailable, base::Bind(&BookmarkModel::OnFaviconDataAvailable,
base::Unretained(this), node), base::Unretained(this),
node),
&cancelable_task_tracker_); &cancelable_task_tracker_);
node->set_favicon_load_task_id(handle); node->set_favicon_load_task_id(taskId);
} }
void BookmarkModel::FaviconLoaded(const BookmarkNode* node) { void BookmarkModel::FaviconLoaded(const BookmarkNode* node) {
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
#ifndef CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ #ifndef CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_
#define CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ #define CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_
#include <deque>
#include <map> #include <map>
#include <vector>
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/callback_forward.h" #include "base/callback_forward.h"
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/containers/hash_tables.h" #include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/task/cancelable_task_tracker.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/favicon/favicon_types.h"
#include "chrome/common/ref_counted_util.h" #include "chrome/common/ref_counted_util.h"
#include "components/keyed_service/core/keyed_service.h" #include "components/keyed_service/core/keyed_service.h"
...@@ -28,10 +27,7 @@ struct FaviconImageResult; ...@@ -28,10 +27,7 @@ struct FaviconImageResult;
// The favicon service provides methods to access favicons. It calls the history // The favicon service provides methods to access favicons. It calls the history
// backend behind the scenes. // backend behind the scenes.
// class FaviconService : public KeyedService {
// This service is thread safe. Each request callback is invoked in the
// thread that made the request.
class FaviconService : public CancelableRequestProvider, public KeyedService {
public: public:
explicit FaviconService(Profile* profile); explicit FaviconService(Profile* profile);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/extensions/extension_icon_manager.h" #include "chrome/browser/extensions/extension_icon_manager.h"
#include "chrome/browser/extensions/extension_service.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/favicon/favicon_service_factory.h"
#include "chrome/browser/history/top_sites.h" #include "chrome/browser/history/top_sites.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/task/cancelable_task_tracker.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" #include "content/public/browser/web_ui_message_handler.h"
class ExtensionIconColorManager; class ExtensionIconColorManager;
...@@ -41,8 +41,7 @@ class FaviconWebUIHandler : public content::WebUIMessageHandler { ...@@ -41,8 +41,7 @@ class FaviconWebUIHandler : public content::WebUIMessageHandler {
private: private:
// Called when favicon data is available from the history backend. // Called when favicon data is available from the history backend.
void OnFaviconDataAvailable( void OnFaviconDataAvailable(int request_handle,
FaviconService::Handle request_handle,
const chrome::FaviconBitmapResult& bitmap_result); const chrome::FaviconBitmapResult& bitmap_result);
base::CancelableTaskTracker cancelable_task_tracker_; 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