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

Unified Diff: chrome/browser/metrics/antivirus_metrics_provider_win.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/metrics/antivirus_metrics_provider_win.cc
diff --git a/chrome/browser/metrics/antivirus_metrics_provider_win.cc b/chrome/browser/metrics/antivirus_metrics_provider_win.cc
index 47681b2f7941e5f81e9af4e5967065b5ce01d86a..f58b9e6cda0cd085dccd38e81300ef8c092d8e7a 100644
--- a/chrome/browser/metrics/antivirus_metrics_provider_win.cc
+++ b/chrome/browser/metrics/antivirus_metrics_provider_win.cc
@@ -339,8 +339,9 @@ AntiVirusMetricsProvider::FillAntiVirusProductsFromWMI(
return RESULT_FAILED_TO_INITIALIZE_COM;
base::win::ScopedComPtr<IWbemLocator> wmi_locator;
- HRESULT hr = wmi_locator.CreateInstance(CLSID_WbemLocator, nullptr,
- CLSCTX_INPROC_SERVER);
+ HRESULT hr =
+ ::CoCreateInstance(CLSID_WbemLocator, nullptr, CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&wmi_locator));
if (FAILED(hr))
return RESULT_FAILED_TO_CREATE_INSTANCE;
« no previous file with comments | « chrome/browser/media_galleries/win/mtp_device_operations_util.cc ('k') | chrome/browser/prefs/incognito_mode_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698