diff options
author | jstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 13:00:16 +0000 |
---|---|---|
committer | jstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 13:00:16 +0000 |
commit | 98e4e52f197d54d35bf356714faf72677ca3720d (patch) | |
tree | a6b388ed82255ffbc8b9c6757d27d2dab11bc06a /chrome/browser/extensions/webstore_install_helper.cc | |
parent | c6933fcf7d7d3d13a0b9fb7ee2c6c59406d60003 (diff) | |
download | chromium_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.cc')
-rw-r--r-- | chrome/browser/extensions/webstore_install_helper.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc index 5a54041..6b3db85 100644 --- a/chrome/browser/extensions/webstore_install_helper.cc +++ b/chrome/browser/extensions/webstore_install_helper.cc @@ -22,11 +22,13 @@ const char kImageDecodeError[] = "Image decode failed"; WebstoreInstallHelper::WebstoreInstallHelper( Delegate* delegate, + const std::string& id, const std::string& manifest, const std::string& icon_data, const GURL& icon_url, net::URLRequestContextGetter* context_getter) : delegate_(delegate), + id_(id), manifest_(manifest), icon_base64_data_(icon_data), icon_url_(icon_url), @@ -177,7 +179,7 @@ void WebstoreInstallHelper::ReportResultsIfComplete() { void WebstoreInstallHelper::ReportResultFromUIThread() { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (error_.empty() && parsed_manifest_.get()) - delegate_->OnWebstoreParseSuccess(icon_, parsed_manifest_.release()); + delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release()); else - delegate_->OnWebstoreParseFailure(parse_error_, error_); + delegate_->OnWebstoreParseFailure(id_, parse_error_, error_); } |