| Index: chrome/browser/extensions/webstore_installer.cc
|
| diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
|
| index da62be7ff9a38a980393b2f54d2892208f42ad5d..8bacfd278b5d20460d9fc0685f88d2537d3138bd 100644
|
| --- a/chrome/browser/extensions/webstore_installer.cc
|
| +++ b/chrome/browser/extensions/webstore_installer.cc
|
| @@ -9,9 +9,9 @@
|
| #include "base/command_line.h"
|
| #include "base/file_util.h"
|
| #include "base/rand_util.h"
|
| -#include "base/stringprintf.h"
|
| -#include "base/string_util.h"
|
| #include "base/string_number_conversions.h"
|
| +#include "base/string_util.h"
|
| +#include "base/stringprintf.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/download/chrome_download_manager_delegate.h"
|
| @@ -29,6 +29,7 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/download_manager.h"
|
| #include "content/public/browser/download_save_info.h"
|
| +#include "content/public/browser/download_url_parameters.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| #include "content/public/browser/navigation_entry.h"
|
| #include "content/public/browser/notification_details.h"
|
| @@ -41,6 +42,7 @@ using content::BrowserThread;
|
| using content::DownloadId;
|
| using content::DownloadItem;
|
| using content::NavigationController;
|
| +using content::DownloadUrlParameters;
|
|
|
| namespace {
|
|
|
| @@ -299,11 +301,12 @@ void WebstoreInstaller::StartDownload(const FilePath& file) {
|
| // We will navigate the current tab to this url to start the download. The
|
| // download system will then pass the crx to the CrxInstaller.
|
| download_util::RecordDownloadSource(
|
| - download_util::INITIATED_BY_WEBSTORE_INSTALLER);
|
| - profile_->GetDownloadManager()->DownloadUrl(
|
| - download_url_, referrer, "",
|
| - false, -1, save_info, controller_->GetWebContents(),
|
| - base::Bind(&WebstoreInstaller::OnDownloadStarted, this));
|
| + download_util::INITIATED_BY_WEBSTORE_INSTALLER);
|
| + DownloadUrlParameters* params = DownloadUrlParameters::FromWebContents(
|
| + controller_->GetWebContents(), download_url_, save_info);
|
| + params->set_referrer(referrer);
|
| + params->set_callback(base::Bind(&WebstoreInstaller::OnDownloadStarted, this));
|
| + profile_->GetDownloadManager()->DownloadUrl(params);
|
| }
|
|
|
| void WebstoreInstaller::ReportFailure(const std::string& error) {
|
|
|