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

Unified Diff: device/generic_sensor/platform_sensor_provider_win.cc

Issue 2887243002: Remove ScopedComPtr::CreateInstance() (Closed)
Patch Set: 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: device/generic_sensor/platform_sensor_provider_win.cc
diff --git a/device/generic_sensor/platform_sensor_provider_win.cc b/device/generic_sensor/platform_sensor_provider_win.cc
index dec5a572c3cb4fd54344f8f3a877b69247fcc636..e8948375a5e4f10f6e5ac83b90fb85e793f6b86f 100644
--- a/device/generic_sensor/platform_sensor_provider_win.cc
+++ b/device/generic_sensor/platform_sensor_provider_win.cc
@@ -4,6 +4,8 @@
#include "device/generic_sensor/platform_sensor_provider_win.h"
+#include <objbase.h>
+
#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "base/task_runner_util.h"
@@ -50,7 +52,8 @@ bool PlatformSensorProviderWin::InitializeSensorManager() {
if (sensor_manager_)
return true;
- HRESULT hr = sensor_manager_.CreateInstance(CLSID_SensorManager);
+ HRESULT hr = ::CoCreateInstance(CLSID_SensorManager, nullptr, CLSCTX_ALL,
+ IID_PPV_ARGS(&sensor_manager_));
return SUCCEEDED(hr);
}
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | device/generic_sensor/platform_sensor_reader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698