Index: content/browser/download/base_file_win.cc |
diff --git a/content/browser/download/base_file_win.cc b/content/browser/download/base_file_win.cc |
index 398e5fc214ff4c80201048dbe376435d9afe0fcb..14b6f68929f76e4b92cbfb9354798ff3493e8cc6 100644 |
--- a/content/browser/download/base_file_win.cc |
+++ b/content/browser/download/base_file_win.cc |
@@ -5,15 +5,17 @@ |
#include "content/browser/download/base_file.h" |
#include <windows.h> |
+#include <cguid.h> |
+#include <objbase.h> |
#include <shellapi.h> |
#include "base/file_util.h" |
+#include "base/guid.h" |
#include "base/metrics/histogram.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/threading/thread_restrictions.h" |
#include "content/browser/download/download_interrupt_reasons_impl.h" |
#include "content/browser/download/download_stats.h" |
-#include "content/browser/safe_util_win.h" |
#include "content/public/browser/browser_thread.h" |
namespace content { |
@@ -326,7 +328,14 @@ DownloadInterruptReason BaseFile::AnnotateWithSourceInformation() { |
bound_net_log_.BeginEvent(net::NetLog::TYPE_DOWNLOAD_FILE_ANNOTATED); |
DownloadInterruptReason result = DOWNLOAD_INTERRUPT_REASON_NONE; |
- HRESULT hr = ScanAndSaveDownloadedFile(full_path_, source_url_); |
+ GUID guid = GUID_NULL; |
+ if (!client_guid_.empty() && base::IsValidGUID(client_guid_)) { |
+ HRESULT hr = CLSIDFromString( |
+ base::UTF8ToUTF16(client_guid_).c_str(), &guid); |
+ if (FAILED(hr)) |
+ guid = GUID_NULL; |
+ } |
+ HRESULT hr = base::AVScanFile(full_path_, source_url_.spec(), guid); |
// If the download file is missing after the call, then treat this as an |
// interrupted download. |