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 08debed102e4b3eb4a076b947cdc2e0f252c9ce5..23f7880b7cc3f35b8eaa4c36f104efdc2996b8cc 100644 |
--- a/chrome/browser/extensions/webstore_install_helper.h |
+++ b/chrome/browser/extensions/webstore_install_helper.h |
@@ -7,26 +7,22 @@ |
#include <vector> |
+#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h" |
-#include "content/public/browser/utility_process_host_client.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
#include "url/gurl.h" |
namespace base { |
class DictionaryValue; |
-class ListValue; |
+class Value; |
} |
namespace chrome { |
class BitmapFetcher; |
} |
-namespace content { |
-class UtilityProcessHost; |
-} |
- |
namespace net { |
class URLRequestContextGetter; |
} |
@@ -37,8 +33,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 content::UtilityProcessHostClient, |
- public chrome::BitmapFetcherDelegate { |
+class WebstoreInstallHelper : public base::RefCounted<WebstoreInstallHelper>, |
+ chrome::BitmapFetcherDelegate { |
public: |
class Delegate { |
public: |
@@ -75,17 +71,14 @@ class WebstoreInstallHelper : public content::UtilityProcessHostClient, |
void Start(); |
private: |
+ friend class base::RefCounted<WebstoreInstallHelper>; |
~WebstoreInstallHelper() override; |
- void StartWorkOnIOThread(); |
void ReportResultsIfComplete(); |
void ReportResultFromUIThread(); |
- // Implementing pieces of the UtilityProcessHostClient interface. |
- bool OnMessageReceived(const IPC::Message& message) override; |
- |
// Message handlers. |
- void OnJSONParseSucceeded(const base::ListValue& wrapper); |
+ void OnJSONParseSucceeded(scoped_ptr<base::Value> wrapper); |
void OnJSONParseFailed(const std::string& error_message); |
// Implementing the chrome::BitmapFetcherDelegate interface. |
@@ -106,8 +99,6 @@ class WebstoreInstallHelper : public content::UtilityProcessHostClient, |
net::URLRequestContextGetter* context_getter_; // Only usable on UI thread. |
scoped_ptr<chrome::BitmapFetcher> icon_fetcher_; |
- base::WeakPtr<content::UtilityProcessHost> utility_host_; |
- |
// Flags for whether we're done doing icon decoding and manifest parsing. |
bool icon_decode_complete_; |
bool manifest_parse_complete_; |