Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: chrome/browser/extensions/webstore_installer.cc

Issue 10232010: DownloadUrlParameters (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: " Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..4dccf62ae336ca13c677e0be143964665b831400 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -41,6 +41,7 @@ using content::BrowserThread;
using content::DownloadId;
using content::DownloadItem;
using content::NavigationController;
+using content::DownloadUrlParameters;
namespace {
@@ -297,11 +298,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) {

Powered by Google App Engine
This is Rietveld 408576698