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

Unified Diff: device/generic_sensor/platform_sensor_and_provider_unittest_win.cc

Issue 2830893004: Migrate IID Coupled Uses of ScopedComPtr::ReceiveVoid() to IID_PPV_ARGS (Closed)
Patch Set: Created 3 years, 8 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_and_provider_unittest_win.cc
diff --git a/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc b/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
index f3dd51dcc51de2acf76c4bfa78358775c4e92b70..fbe917fe68b439ac74b5a8aab3f7751f6668909b 100644
--- a/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
+++ b/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
@@ -3,8 +3,9 @@
// found in the LICENSE file.
#include <SensorsApi.h>
-#include <Sensors.h> // NOLINT
-#include <Propvarutil.h> // NOLINT
+#include <objbase.h>
+#include <propvarutil.h>
+#include <sensors.h>
#include "base/bind.h"
#include "base/memory/ptr_util.h"
@@ -193,8 +194,7 @@ class PlatformSensorAndProviderTestWin : public ::testing::Test {
sensor_collection_ = new NiceMock<MockISensorCollection>();
sensor_manager_ = new NiceMock<MockISensorManager>();
base::win::ScopedComPtr<ISensorManager> manager;
- sensor_manager_->QueryInterface(__uuidof(ISensorManager),
- manager.ReceiveVoid());
+ sensor_manager_->QueryInterface(IID_PPV_ARGS(&manager));
// Overrides default ISensorManager with mocked interface.
PlatformSensorProviderWin::GetInstance()->SetSensorManagerForTesting(
@@ -351,8 +351,7 @@ class PlatformSensorAndProviderTestWin : public ::testing::Test {
// it when there are not more references.
auto* mock_report = new NiceMock<MockISensorDataReport>();
base::win::ScopedComPtr<ISensorDataReport> data_report;
- mock_report->QueryInterface(__uuidof(ISensorDataReport),
- data_report.ReceiveVoid());
+ mock_report->QueryInterface(IID_PPV_ARGS(&data_report));
EXPECT_CALL(*mock_report, GetTimestamp(_))
.WillOnce(Invoke([](SYSTEMTIME* timestamp) {
« no previous file with comments | « components/update_client/background_downloader_win.cc ('k') | device/sensors/data_fetcher_shared_memory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698