summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/webstore_install_helper.h
diff options
context:
space:
mode:
authorjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-25 13:00:16 +0000
committerjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-25 13:00:16 +0000
commit98e4e52f197d54d35bf356714faf72677ca3720d (patch)
treea6b388ed82255ffbc8b9c6757d27d2dab11bc06a /chrome/browser/extensions/webstore_install_helper.h
parentc6933fcf7d7d3d13a0b9fb7ee2c6c59406d60003 (diff)
downloadchromium_src-98e4e52f197d54d35bf356714faf72677ca3720d.zip
chromium_src-98e4e52f197d54d35bf356714faf72677ca3720d.tar.gz
chromium_src-98e4e52f197d54d35bf356714faf72677ca3720d.tar.bz2
Update WebstoreInstaller to be ref counted.
This simplifies the WebstoreInstaller by making it live until the installation has succeeded or failed. This also fixes a problem with installing extensions from incognito windows by having the WebstoreInstaller explicitly pass in the NavigationController used to download the extension. BUG=100788, 98687 TEST=*WebstorePrivate* Review URL: http://codereview.chromium.org/8375034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/webstore_install_helper.h')
-rw-r--r--chrome/browser/extensions/webstore_install_helper.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/extensions/webstore_install_helper.h b/chrome/browser/extensions/webstore_install_helper.h
index 9160548..8620281 100644
--- a/chrome/browser/extensions/webstore_install_helper.h
+++ b/chrome/browser/extensions/webstore_install_helper.h
@@ -41,12 +41,14 @@ class WebstoreInstallHelper : public UtilityProcessHost::Client,
// Called when we've successfully parsed the manifest and decoded the icon
// in the utility process. Ownership of parsed_manifest is transferred.
virtual void OnWebstoreParseSuccess(
+ const std::string& id,
const SkBitmap& icon,
base::DictionaryValue* parsed_manifest) = 0;
// Called to indicate a parse failure. The |result_code| parameter should
// indicate whether the problem was with the manifest or icon.
virtual void OnWebstoreParseFailure(
+ const std::string& id,
InstallHelperResultCode result_code,
const std::string& error_message) = 0;
};
@@ -54,6 +56,7 @@ class WebstoreInstallHelper : public UtilityProcessHost::Client,
// Only one of |icon_data| (based64-encoded icon data) or |icon_url| can be
// specified, but it is legal for both to be empty.
WebstoreInstallHelper(Delegate* delegate,
+ const std::string& id,
const std::string& manifest,
const std::string& icon_data,
const GURL& icon_url,
@@ -83,6 +86,9 @@ class WebstoreInstallHelper : public UtilityProcessHost::Client,
// The client who we'll report results back to.
Delegate* delegate_;
+ // The extension id of the manifest we're parsing.
+ std::string id_;
+
// The manifest to parse.
std::string manifest_;