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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.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
Index: chrome/browser/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index fc95cbf4f129ef68b2e2c50d187f02548b1c81d1..3a909c791d032ecabac91c12caa0a67401e7d833 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -252,12 +252,12 @@ bool ChromeDownloadManagerDelegate::ShouldOpenFileBasedOnExtension(
void ChromeDownloadManagerDelegate::DisableSafeBrowsing(DownloadItem* item) {
#if defined(ENABLE_SAFE_BROWSING)
SafeBrowsingState* state = static_cast<SafeBrowsingState*>(
- item->GetExternalData(&safe_browsing_id));
+ item->GetUserData(&safe_browsing_id));
DCHECK(!state);
if (!state)
state = new SafeBrowsingState();
state->SetVerdict(DownloadProtectionService::SAFE);
- item->SetExternalData(&safe_browsing_id, state);
+ item->SetUserData(&safe_browsing_id, state);
#endif
}
@@ -266,7 +266,7 @@ bool ChromeDownloadManagerDelegate::IsDownloadReadyForCompletion(
const base::Closure& internal_complete_callback) {
#if defined(ENABLE_SAFE_BROWSING)
SafeBrowsingState* state = static_cast<SafeBrowsingState*>(
- item->GetExternalData(&safe_browsing_id));
+ item->GetUserData(&safe_browsing_id));
if (!state) {
// Begin the safe browsing download protection check.
DownloadProtectionService* service = GetDownloadProtectionService();
@@ -275,7 +275,7 @@ bool ChromeDownloadManagerDelegate::IsDownloadReadyForCompletion(
<< item->DebugString(false);
state = new SafeBrowsingState();
state->set_callback(internal_complete_callback);
- item->SetExternalData(&safe_browsing_id, state);
+ item->SetUserData(&safe_browsing_id, state);
service->CheckClientDownload(
DownloadProtectionService::DownloadInfo::FromDownloadItem(*item),
base::Bind(
@@ -609,7 +609,7 @@ void ChromeDownloadManagerDelegate::CheckClientDownloadDone(
}
SafeBrowsingState* state = static_cast<SafeBrowsingState*>(
- item->GetExternalData(&safe_browsing_id));
+ item->GetUserData(&safe_browsing_id));
state->SetVerdict(result);
}
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_download_observer.cc ('k') | chrome/browser/download/download_completion_blocker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698