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

Unified Diff: device/sensors/data_fetcher_shared_memory_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
« no previous file with comments | « device/generic_sensor/platform_sensor_reader_win.cc ('k') | media/audio/win/audio_low_latency_input_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/sensors/data_fetcher_shared_memory_win.cc
diff --git a/device/sensors/data_fetcher_shared_memory_win.cc b/device/sensors/data_fetcher_shared_memory_win.cc
index 9405d005a1b6dbc16807de09a28c19b66b80516c..4ec59fa4641c282078ea4402ce735d4afe0a165a 100644
--- a/device/sensors/data_fetcher_shared_memory_win.cc
+++ b/device/sensors/data_fetcher_shared_memory_win.cc
@@ -317,7 +317,8 @@ bool DataFetcherSharedMemory::RegisterForSensor(
return false;
base::win::ScopedComPtr<ISensorManager> sensor_manager;
- HRESULT hr = sensor_manager.CreateInstance(CLSID_SensorManager);
+ HRESULT hr = ::CoCreateInstance(CLSID_SensorManager, nullptr, CLSCTX_ALL,
+ IID_PPV_ARGS(&sensor_manager));
if (FAILED(hr) || !sensor_manager.Get())
return false;
@@ -338,7 +339,8 @@ bool DataFetcherSharedMemory::RegisterForSensor(
return false;
base::win::ScopedComPtr<IPortableDeviceValues> device_values;
- if (SUCCEEDED(device_values.CreateInstance(CLSID_PortableDeviceValues))) {
+ if (SUCCEEDED(::CoCreateInstance(CLSID_PortableDeviceValues, nullptr,
+ CLSCTX_ALL, IID_PPV_ARGS(&device_values)))) {
if (SUCCEEDED(device_values->SetUnsignedIntegerValue(
SENSOR_PROPERTY_CURRENT_REPORT_INTERVAL,
GetInterval().InMilliseconds()))) {
« no previous file with comments | « device/generic_sensor/platform_sensor_reader_win.cc ('k') | media/audio/win/audio_low_latency_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698