| Index: chrome/browser/extensions/webstore_install_helper.h
|
| diff --git a/chrome/browser/extensions/webstore_install_helper.h b/chrome/browser/extensions/webstore_install_helper.h
|
| index 4a432b9a92c6b39d47be25f0edb195c47aca0143..08debed102e4b3eb4a076b947cdc2e0f252c9ce5 100644
|
| --- a/chrome/browser/extensions/webstore_install_helper.h
|
| +++ b/chrome/browser/extensions/webstore_install_helper.h
|
| @@ -9,25 +9,25 @@
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| -#include "chrome/browser/image_decoder.h"
|
| +#include "chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h"
|
| #include "content/public/browser/utility_process_host_client.h"
|
| -#include "net/url_request/url_fetcher_delegate.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "url/gurl.h"
|
|
|
| -class SkBitmap;
|
| -
|
| namespace base {
|
| class DictionaryValue;
|
| class ListValue;
|
| }
|
|
|
| +namespace chrome {
|
| +class BitmapFetcher;
|
| +}
|
| +
|
| namespace content {
|
| class UtilityProcessHost;
|
| }
|
|
|
| namespace net {
|
| -class URLFetcher;
|
| class URLRequestContextGetter;
|
| }
|
|
|
| @@ -37,9 +37,8 @@ namespace extensions {
|
| // sending work to the utility process for parsing manifests and
|
| // fetching/decoding icon data. Clients must implement the
|
| // WebstoreInstallHelper::Delegate interface to receive the parsed data.
|
| -class WebstoreInstallHelper : public ImageDecoder::ImageRequest,
|
| - public content::UtilityProcessHostClient,
|
| - public net::URLFetcherDelegate {
|
| +class WebstoreInstallHelper : public content::UtilityProcessHostClient,
|
| + public chrome::BitmapFetcherDelegate {
|
| public:
|
| class Delegate {
|
| public:
|
| @@ -82,9 +81,6 @@ class WebstoreInstallHelper : public ImageDecoder::ImageRequest,
|
| void ReportResultsIfComplete();
|
| void ReportResultFromUIThread();
|
|
|
| - // Implementing the net::URLFetcherDelegate interface.
|
| - void OnURLFetchComplete(const net::URLFetcher* source) override;
|
| -
|
| // Implementing pieces of the UtilityProcessHostClient interface.
|
| bool OnMessageReceived(const IPC::Message& message) override;
|
|
|
| @@ -92,9 +88,8 @@ class WebstoreInstallHelper : public ImageDecoder::ImageRequest,
|
| void OnJSONParseSucceeded(const base::ListValue& wrapper);
|
| void OnJSONParseFailed(const std::string& error_message);
|
|
|
| - // ImageDecoder::ImageRequest implementation.
|
| - void OnImageDecoded(const SkBitmap& decoded_image) override;
|
| - void OnDecodeImageFailed() override;
|
| + // Implementing the chrome::BitmapFetcherDelegate interface.
|
| + void OnFetchComplete(const GURL& url, const SkBitmap* image) override;
|
|
|
| // The client who we'll report results back to.
|
| Delegate* delegate_;
|
| @@ -108,10 +103,8 @@ class WebstoreInstallHelper : public ImageDecoder::ImageRequest,
|
| // If |icon_url_| is non-empty, it needs to be fetched and decoded into an
|
| // SkBitmap.
|
| GURL icon_url_;
|
| -
|
| - // For fetching the icon, if needed.
|
| - scoped_ptr<net::URLFetcher> url_fetcher_;
|
| net::URLRequestContextGetter* context_getter_; // Only usable on UI thread.
|
| + scoped_ptr<chrome::BitmapFetcher> icon_fetcher_;
|
|
|
| base::WeakPtr<content::UtilityProcessHost> utility_host_;
|
|
|
| @@ -119,7 +112,7 @@ class WebstoreInstallHelper : public ImageDecoder::ImageRequest,
|
| bool icon_decode_complete_;
|
| bool manifest_parse_complete_;
|
|
|
| - // The results of succesful decoding/parsing.
|
| + // The results of successful decoding/parsing.
|
| SkBitmap icon_;
|
| scoped_ptr<base::DictionaryValue> parsed_manifest_;
|
|
|
|
|