| Index: chrome/browser/extensions/webstore_installer.cc
|
| diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
|
| index fc29dd3dd94314300cb04905c8968428598863b4..da62be7ff9a38a980393b2f54d2892208f42ad5d 100644
|
| --- a/chrome/browser/extensions/webstore_installer.cc
|
| +++ b/chrome/browser/extensions/webstore_installer.cc
|
| @@ -119,17 +119,19 @@ void GetDownloadFilePath(
|
|
|
| } // namespace
|
|
|
| -const WebstoreInstaller::Approval* WebstoreInstaller::GetAssociatedApproval(
|
| - const DownloadItem& download) {
|
| - return static_cast<const Approval*>(download.GetExternalData(kApprovalKey));
|
| -}
|
| -
|
| WebstoreInstaller::Approval::Approval()
|
| : profile(NULL),
|
| use_app_installed_bubble(false),
|
| - skip_post_install_ui(false) {}
|
| + skip_post_install_ui(false) {
|
| +}
|
| +
|
| WebstoreInstaller::Approval::~Approval() {}
|
|
|
| +const WebstoreInstaller::Approval* WebstoreInstaller::GetAssociatedApproval(
|
| + const DownloadItem& download) {
|
| + return static_cast<const Approval*>(download.GetExternalData(kApprovalKey));
|
| +}
|
| +
|
| WebstoreInstaller::WebstoreInstaller(Profile* profile,
|
| Delegate* delegate,
|
| NavigationController* controller,
|
| @@ -154,13 +156,6 @@ WebstoreInstaller::WebstoreInstaller(Profile* profile,
|
| content::Source<CrxInstaller>(NULL));
|
| }
|
|
|
| -WebstoreInstaller::~WebstoreInstaller() {
|
| - if (download_item_) {
|
| - download_item_->RemoveObserver(this);
|
| - download_item_ = NULL;
|
| - }
|
| -}
|
| -
|
| void WebstoreInstaller::Start() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| AddRef(); // Balanced in ReportSuccess and ReportFailure.
|
| @@ -229,6 +224,13 @@ void WebstoreInstaller::SetDownloadDirectoryForTests(FilePath* directory) {
|
| g_download_directory_for_tests = directory;
|
| }
|
|
|
| +WebstoreInstaller::~WebstoreInstaller() {
|
| + if (download_item_) {
|
| + download_item_->RemoveObserver(this);
|
| + download_item_ = NULL;
|
| + }
|
| +}
|
| +
|
| void WebstoreInstaller::OnDownloadStarted(DownloadId id, net::Error error) {
|
| if (error != net::OK) {
|
| ReportFailure(net::ErrorToString(error));
|
|
|