Index: chrome/browser/icon_manager.h |
diff --git a/chrome/browser/icon_manager.h b/chrome/browser/icon_manager.h |
index 43c36acedc0e64f6e91e00f4e7c84878081fe16a..d94b5e66a849713f5e0c3c291e8c99d75aff3e16 100644 |
--- a/chrome/browser/icon_manager.h |
+++ b/chrome/browser/icon_manager.h |
@@ -50,14 +50,15 @@ |
#include "base/files/file_path.h" |
#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/task/cancelable_task_tracker.h" |
#include "chrome/browser/icon_loader.h" |
#include "ui/gfx/image/image.h" |
-class IconManager : public IconLoader::Delegate { |
+class IconManager { |
public: |
IconManager(); |
- ~IconManager() override; |
+ ~IconManager(); |
// Synchronous call to examine the internal caches for the icon. Returns the |
// icon if we have already loaded it, or null if we don't have it and must |
@@ -86,10 +87,9 @@ class IconManager : public IconLoader::Delegate { |
base::CancelableTaskTracker* tracker); |
private: |
- // IconLoader::Delegate interface. |
- void OnImageLoaded(IconLoader* loader, |
- std::unique_ptr<gfx::Image> result, |
- const IconLoader::IconGroup& group) override; |
+ void OnIconLoaded(IconLoader* loader, |
+ std::unique_ptr<gfx::Image> result, |
+ const IconLoader::IconGroup& group); |
struct CacheKey { |
CacheKey(const IconLoader::IconGroup& group, IconLoader::IconSize size); |
@@ -108,6 +108,8 @@ class IconManager : public IconLoader::Delegate { |
struct ClientRequest; |
std::map<IconLoader*, ClientRequest> requests_; |
+ base::WeakPtrFactory<IconManager> weak_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(IconManager); |
}; |