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

Unified Diff: chrome/browser/ui/app_list/search/common/url_icon_source.h

Issue 931993002: Make image_decoder a Leaky LazyInstance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a few comments Created 5 years, 9 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/app_list/search/common/url_icon_source.h
diff --git a/chrome/browser/ui/app_list/search/common/url_icon_source.h b/chrome/browser/ui/app_list/search/common/url_icon_source.h
index 6d910bea0cb5870937e33b61168dd59ee06d145b..63c74f573ec96b1c040a018443087fa0cc88f698 100644
--- a/chrome/browser/ui/app_list/search/common/url_icon_source.h
+++ b/chrome/browser/ui/app_list/search/common/url_icon_source.h
@@ -26,7 +26,7 @@ namespace app_list {
// fetched, the default icon (specified by it's resource id) is shown.
class UrlIconSource : public gfx::ImageSkiaSource,
public net::URLFetcherDelegate,
- public ImageDecoder::Delegate {
+ public ImageDecoder::ImageRequest {
public:
typedef base::Closure IconLoadedCallback;
@@ -50,10 +50,9 @@ class UrlIconSource : public gfx::ImageSkiaSource,
// net::URLFetcherDelegate overrides:
void OnURLFetchComplete(const net::URLFetcher* source) override;
- // ImageDecoder::Delegate overrides:
- void OnImageDecoded(const ImageDecoder* decoder,
- const SkBitmap& decoded_image) override;
- void OnDecodeImageFailed(const ImageDecoder* decoder) override;
+ // ImageDecoder::ImageRequest overrides:
+ void OnImageDecoded(const SkBitmap& decoded_image) override;
+ void OnDecodeImageFailed() override;
IconLoadedCallback icon_loaded_callback_;
net::URLRequestContextGetter* context_getter_;
@@ -64,8 +63,6 @@ class UrlIconSource : public gfx::ImageSkiaSource,
bool icon_fetch_attempted_;
scoped_ptr<net::URLFetcher> icon_fetcher_;
- scoped_refptr<ImageDecoder> image_decoder_;
-
gfx::ImageSkia icon_;
DISALLOW_COPY_AND_ASSIGN(UrlIconSource);
« no previous file with comments | « chrome/browser/profiles/profile_downloader.cc ('k') | chrome/browser/ui/app_list/search/common/url_icon_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698