Index: content/common/quarantine/quarantine_win.cc |
diff --git a/content/common/quarantine/quarantine_win.cc b/content/common/quarantine/quarantine_win.cc |
index 3feb1966af8854527e17aa2f195465ce6cdcd720..1c5d0fc9b24f1c164d12250c29c32060fa7a30d1 100644 |
--- a/content/common/quarantine/quarantine_win.cc |
+++ b/content/common/quarantine/quarantine_win.cc |
@@ -25,6 +25,7 @@ |
#include "base/strings/string_split.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/threading/thread_restrictions.h" |
+#include "base/win/scoped_com_initializer.h" |
#include "base/win/scoped_comptr.h" |
#include "base/win/scoped_handle.h" |
#include "url/gurl.h" |
@@ -302,6 +303,10 @@ QuarantineFileResult QuarantineFile(const base::FilePath& file, |
const std::string& client_guid) { |
base::ThreadRestrictions::AssertIOAllowed(); |
+ // TODO(siggi): As this is a rare operation, this seems better than putting |
Sigurður Ásgeirsson
2017/07/20 12:36:34
Gab: there are two places where downloading needs
robliao
2017/07/20 18:29:17
I was actually thinking about making ScopedCOMInit
Sigurður Ásgeirsson
2017/07/20 19:48:15
I'm not sure, but I'm pretty sure it's out of scop
robliao
2017/07/20 20:15:53
Dropping all of downloads in a COM STA sounds fine
|
+ // all download activity on a COM STA sequence. |
+ base::win::ScopedCOMInitializer com_initializer; |
+ |
int64_t file_size = 0; |
if (!base::PathExists(file) || !base::GetFileSize(file, &file_size)) |
return QuarantineFileResult::FILE_MISSING; |