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

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

Issue 99005: Add quarantine metadata to downloads on the Mac. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/download/download_file.h ('k') | chrome/browser/history/download_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_file.cc
===================================================================
--- chrome/browser/download/download_file.cc (revision 14427)
+++ chrome/browser/download/download_file.cc (working copy)
@@ -26,6 +26,8 @@
#if defined(OS_WIN)
#include "chrome/common/win_util.h"
#include "chrome/common/win_safe_util.h"
+#elif defined(OS_MACOSX)
+#include "chrome/common/quarantine_mac.h"
#endif
// Throttle updates to the UI thread so that a fast moving download doesn't
@@ -54,6 +56,8 @@
DownloadFile::DownloadFile(const DownloadCreateInfo* info)
: file_(NULL),
+ source_url_(info->url),
+ referrer_url_(info->referrer_url),
id_(info->download_id),
render_process_id_(info->render_process_id),
render_view_id_(info->render_view_id),
@@ -136,7 +140,8 @@
// We ignore the return value because a failure is not fatal.
win_util::SetInternetZoneIdentifier(full_path_);
#elif defined(OS_MACOSX)
- // TODO(port): Set quarrantine information, http://crbug.com/10853
+ quarantine_mac::AddQuarantineMetadataToFile(full_path_, source_url_,
+ referrer_url_);
#endif
return true;
}
« no previous file with comments | « chrome/browser/download/download_file.h ('k') | chrome/browser/history/download_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698