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

Unified Diff: chrome/browser/extensions/webstore_install_helper.h

Issue 855513002: Add/resurrect support for bundles of WebStore items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testext_bundle
Patch Set: remove icon_data 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/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..f5848a8ab9e8e83aff9ec34245c21a07990cfcba 100644
--- a/chrome/browser/extensions/webstore_install_helper.h
+++ b/chrome/browser/extensions/webstore_install_helper.h
@@ -9,13 +9,11 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/image_decoder.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;
+class SafeImageFetcher;
namespace base {
class DictionaryValue;
@@ -27,7 +25,6 @@ class UtilityProcessHost;
}
namespace net {
-class URLFetcher;
class URLRequestContextGetter;
}
@@ -37,9 +34,7 @@ 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:
class Delegate {
public:
@@ -82,9 +77,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 +84,7 @@ 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;
+ void OnIconFetched(const SkBitmap& icon);
// The client who we'll report results back to.
Delegate* delegate_;
@@ -108,10 +98,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<SafeImageFetcher> icon_fetcher_;
base::WeakPtr<content::UtilityProcessHost> utility_host_;
@@ -119,7 +107,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_;

Powered by Google App Engine
This is Rietveld 408576698