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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.cc

Issue 12313141: Use DownloadItem directly in DownloadProtectionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes Created 7 years, 10 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 | « no previous file | chrome/browser/download/chrome_download_manager_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d35309ad74ea7a0979c8a8c79d588071dbcb90c7..535d16013049e926947d21e8d709c32b4c2b7a65 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -238,7 +238,7 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
VLOG(2) << __FUNCTION__ << "() Start SB URL check for download = "
<< download->DebugString(false);
service->CheckDownloadUrl(
- DownloadProtectionService::DownloadInfo::FromDownloadItem(*download),
+ *download,
base::Bind(
&ChromeDownloadManagerDelegate::CheckDownloadUrlDone,
this,
@@ -327,7 +327,7 @@ bool ChromeDownloadManagerDelegate::IsDownloadReadyForCompletion(
state->set_callback(internal_complete_callback);
item->SetUserData(&safe_browsing_id, state);
service->CheckClientDownload(
- DownloadProtectionService::DownloadInfo::FromDownloadItem(*item),
+ item,
base::Bind(
&ChromeDownloadManagerDelegate::CheckClientDownloadDone,
this,
@@ -692,13 +692,10 @@ void ChromeDownloadManagerDelegate::CheckVisitedReferrerBeforeDone(
// protection, mark it as potentially dangerous content until we are done
// with scanning it.
if (service && service->enabled()) {
- DownloadProtectionService::DownloadInfo info =
- DownloadProtectionService::DownloadInfo::FromDownloadItem(*download);
- info.target_file = suggested_path;
// TODO(noelutz): if the user changes the extension name in the UI to
// something like .exe SafeBrowsing will currently *not* check if the
// download is malicious.
- if (service->IsSupportedDownload(info))
+ if (service->IsSupportedDownload(*download, suggested_path))
danger_type = content::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT;
}
#endif
« no previous file with comments | « no previous file | chrome/browser/download/chrome_download_manager_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698