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

Unified Diff: chrome/browser/win/settings_app_monitor.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
« no previous file with comments | « chrome/browser/win/jumplist_updater.cc ('k') | chrome/installer/gcapi/gcapi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/settings_app_monitor.cc
diff --git a/chrome/browser/win/settings_app_monitor.cc b/chrome/browser/win/settings_app_monitor.cc
index a9409d8defbc1b492c431428fd6d97996fc8ea34..1f67ad446a38ad7994ed284fd59420062486f1fc 100644
--- a/chrome/browser/win/settings_app_monitor.cc
+++ b/chrome/browser/win/settings_app_monitor.cc
@@ -6,6 +6,7 @@
#include <atlbase.h>
#include <atlcom.h>
+#include <objbase.h>
#include <oleauto.h>
#include <stdint.h>
#include <uiautomation.h>
@@ -649,8 +650,9 @@ void SettingsAppMonitor::Context::Initialize(
monitor_runner_ = monitor_runner;
monitor_ = monitor;
- HRESULT result = automation_.CreateInstance(CLSID_CUIAutomation, nullptr,
- CLSCTX_INPROC_SERVER);
+ HRESULT result =
+ ::CoCreateInstance(CLSID_CUIAutomation, nullptr, CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&automation_));
if (SUCCEEDED(result))
result = automation_ ? InstallObservers() : E_FAIL;
« no previous file with comments | « chrome/browser/win/jumplist_updater.cc ('k') | chrome/installer/gcapi/gcapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698