summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/chrome_download_manager_delegate.cc
diff options
context:
space:
mode:
authorbenjhayden@chromium.org <benjhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-08 18:18:37 +0000
committerbenjhayden@chromium.org <benjhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-08 18:18:37 +0000
commitd59d40cee5aff1d505099d467bd4c9c342f01347 (patch)
tree17c3cf573da5cf73cb49f513cb069e5ae33cbb7a /chrome/browser/download/chrome_download_manager_delegate.cc
parentd91d67e111d6ec31e92f49310fb5b4b96db77c4f (diff)
downloadchromium_src-d59d40cee5aff1d505099d467bd4c9c342f01347.zip
chromium_src-d59d40cee5aff1d505099d467bd4c9c342f01347.tar.gz
chromium_src-d59d40cee5aff1d505099d467bd4c9c342f01347.tar.bz2
Make DownloadItem derive SupportsUserData instead of re-implementing it.
Reviewers: aa: webstore_installer.* Done: sky: mock_download_item.h achuith: gdata_download_observer.cc rdsmith, asanka: * Review URL: https://chromiumcodereview.appspot.com/10833058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/chrome_download_manager_delegate.cc')
-rw-r--r--chrome/browser/download/chrome_download_manager_delegate.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index fc95cbf..3a909c7 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);
}