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

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

Issue 10833058: Make DownloadItem derive SupportsUserData instead of re-implementing it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gdata: "external"->"user" Created 8 years, 4 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
« no previous file with comments | « chrome/browser/extensions/webstore_installer.h ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_installer.cc
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index 1dfb39f0c05d43c8f03559d18b0761c14cc6438a..644b99ca07dae55c431ce33a3edf4a69f70dc6df 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -167,7 +167,7 @@ WebstoreInstaller::Approval::~Approval() {}
const WebstoreInstaller::Approval* WebstoreInstaller::GetAssociatedApproval(
const DownloadItem& download) {
- return static_cast<const Approval*>(download.GetExternalData(kApprovalKey));
+ return static_cast<const Approval*>(download.GetUserData(kApprovalKey));
}
WebstoreInstaller::WebstoreInstaller(Profile* profile,
@@ -283,7 +283,7 @@ void WebstoreInstaller::OnDownloadStarted(DownloadId id, net::Error error) {
download_item_ = download_manager->GetActiveDownloadItem(id.local());
download_item_->AddObserver(this);
if (approval_.get())
- download_item_->SetExternalData(kApprovalKey, approval_.release());
+ download_item_->SetUserData(kApprovalKey, approval_.release());
}
void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) {
« no previous file with comments | « chrome/browser/extensions/webstore_installer.h ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698