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

Unified Diff: chromeos/dbus/services/service_provider_test_helper.cc

Issue 1782963002: Remove std::mem_fun uses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: chromeos/dbus/services/service_provider_test_helper.cc
diff --git a/chromeos/dbus/services/service_provider_test_helper.cc b/chromeos/dbus/services/service_provider_test_helper.cc
index 7407946c1aea67f70df364da71011de99e590a1a..33f3d9d37e7d5be7cb2934125c04a788e84f87a2 100644
--- a/chromeos/dbus/services/service_provider_test_helper.cc
+++ b/chromeos/dbus/services/service_provider_test_helper.cc
@@ -61,15 +61,27 @@ void ServiceProviderTestHelper::SetUp(
dbus::ObjectPath(kLibCrosServicePath));
// |mock_object_proxy_|'s MockCallMethodAndBlock() will use
// MockCallMethodAndBlock() to return responses.
+ struct InterfaceGetter {
+ using result_type = std::string;
+ std::string operator()(dbus::MethodCall* method_call) {
+ return method_call->GetInterface();
+ }
+ };
Nico 2016/03/10 22:23:19 I love all the other changes in this CL, but this
vmpstr 2016/03/10 22:45:00 I figured that it's probably OK since this is test
+
+ struct MemberGetter {
+ using result_type = std::string;
+ std::string operator()(dbus::MethodCall* method_call) {
+ return method_call->GetMember();
+ }
+ };
+
EXPECT_CALL(*mock_object_proxy_.get(),
MockCallMethodAndBlock(
- AllOf(ResultOf(std::mem_fun(&dbus::MethodCall::GetInterface),
- kLibCrosServiceInterface),
- ResultOf(std::mem_fun(&dbus::MethodCall::GetMember),
- exported_method_name)),
+ AllOf(ResultOf(InterfaceGetter(), kLibCrosServiceInterface),
+ ResultOf(MemberGetter(), exported_method_name)),
_))
.WillOnce(
- Invoke(this, &ServiceProviderTestHelper::MockCallMethodAndBlock));
+ Invoke(this, &ServiceProviderTestHelper::MockCallMethodAndBlock));
service_provider->Start(mock_exported_object_.get());
}

Powered by Google App Engine
This is Rietveld 408576698