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

Unified Diff: chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc

Issue 2894483002: Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/... (Closed)
Patch Set: Fix Header Include Location Created 3 years, 7 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
Index: chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc
diff --git a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc
index 5e6ec1feec8dff33acf72dbd9df495592e81aefc..73c34930955004a9b2e259e6bbcf4a45fef147d4 100644
--- a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc
+++ b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc
@@ -6,6 +6,7 @@
#if defined(OS_WIN)
#include <windows.h>
+#include <objbase.h>
#include <shlobj.h>
#endif
@@ -31,7 +32,8 @@ base::File::Error ScanFile(const base::FilePath& dest_platform_path) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
base::win::ScopedComPtr<IAttachmentExecute> attachment_services;
- HRESULT hr = attachment_services.CreateInstance(CLSID_AttachmentServices);
+ HRESULT hr = ::CoCreateInstance(CLSID_AttachmentServices, nullptr, CLSCTX_ALL,
+ IID_PPV_ARGS(&attachment_services));
if (FAILED(hr)) {
// The thread must have COM initialized.

Powered by Google App Engine
This is Rietveld 408576698