mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
358300997 Cleanup Qualifies std::string
This commit is contained in:
@@ -93,9 +93,10 @@ DoDhKeyExchange(BaseEndpointChannel* channel_a,
|
||||
{
|
||||
.on_success_cb =
|
||||
[&latch, &context_a](
|
||||
const string& endpoint_id,
|
||||
const std::string& endpoint_id,
|
||||
std::unique_ptr<securegcm::UKey2Handshake> ukey2,
|
||||
const string& auth_token, const ByteArray& raw_auth_token) {
|
||||
const std::string& auth_token,
|
||||
const ByteArray& raw_auth_token) {
|
||||
NEARBY_LOG(INFO, "client-A side key negotiation done");
|
||||
EXPECT_TRUE(ukey2->VerifyHandshake());
|
||||
auto context = ukey2->ToConnectionContext();
|
||||
@@ -104,7 +105,8 @@ DoDhKeyExchange(BaseEndpointChannel* channel_a,
|
||||
latch.CountDown();
|
||||
},
|
||||
.on_failure_cb =
|
||||
[&latch](const string& endpoint_id, EndpointChannel* channel) {
|
||||
[&latch](const std::string& endpoint_id,
|
||||
EndpointChannel* channel) {
|
||||
NEARBY_LOG(INFO, "client-A side key negotiation failed");
|
||||
latch.CountDown();
|
||||
},
|
||||
@@ -114,9 +116,10 @@ DoDhKeyExchange(BaseEndpointChannel* channel_a,
|
||||
{
|
||||
.on_success_cb =
|
||||
[&latch, &context_b](
|
||||
const string& endpoint_id,
|
||||
const std::string& endpoint_id,
|
||||
std::unique_ptr<securegcm::UKey2Handshake> ukey2,
|
||||
const string& auth_token, const ByteArray& raw_auth_token) {
|
||||
const std::string& auth_token,
|
||||
const ByteArray& raw_auth_token) {
|
||||
NEARBY_LOG(INFO, "client-B side key negotiation done");
|
||||
EXPECT_TRUE(ukey2->VerifyHandshake());
|
||||
auto context = ukey2->ToConnectionContext();
|
||||
@@ -125,7 +128,8 @@ DoDhKeyExchange(BaseEndpointChannel* channel_a,
|
||||
latch.CountDown();
|
||||
},
|
||||
.on_failure_cb =
|
||||
[&latch](const string& endpoint_id, EndpointChannel* channel) {
|
||||
[&latch](const std::string& endpoint_id,
|
||||
EndpointChannel* channel) {
|
||||
NEARBY_LOG(INFO, "client-B side key negotiation failed");
|
||||
latch.CountDown();
|
||||
},
|
||||
|
||||
@@ -116,7 +116,7 @@ class MockPcpHandler : public BasePcpHandler {
|
||||
(override));
|
||||
MOCK_METHOD(Status, StopAdvertisingImpl, (ClientProxy * client), (override));
|
||||
MOCK_METHOD(StartOperationResult, StartDiscoveryImpl,
|
||||
(ClientProxy * client, const string& service_id,
|
||||
(ClientProxy * client, const std::string& service_id,
|
||||
const ConnectionOptions& options),
|
||||
(override));
|
||||
MOCK_METHOD(Status, StopDiscoveryImpl, (ClientProxy * client), (override));
|
||||
|
||||
@@ -88,15 +88,16 @@ TEST(EncryptionRunnerTest, ReadWrite) {
|
||||
&user_a.client, "endpoint_id", &user_a.channel,
|
||||
{
|
||||
.on_success_cb =
|
||||
[&response](const string& endpoint_id,
|
||||
[&response](const std::string& endpoint_id,
|
||||
std::unique_ptr<securegcm::UKey2Handshake> ukey2,
|
||||
const string& auth_token,
|
||||
const std::string& auth_token,
|
||||
const ByteArray& raw_auth_token) {
|
||||
response.server_status = Response::Status::kDone;
|
||||
response.latch.CountDown();
|
||||
},
|
||||
.on_failure_cb =
|
||||
[&response](const string& endpoint_id, EndpointChannel* channel) {
|
||||
[&response](const std::string& endpoint_id,
|
||||
EndpointChannel* channel) {
|
||||
response.server_status = Response::Status::kFailed;
|
||||
response.latch.CountDown();
|
||||
},
|
||||
@@ -105,15 +106,16 @@ TEST(EncryptionRunnerTest, ReadWrite) {
|
||||
&user_b.client, "endpoint_id", &user_b.channel,
|
||||
{
|
||||
.on_success_cb =
|
||||
[&response](const string& endpoint_id,
|
||||
[&response](const std::string& endpoint_id,
|
||||
std::unique_ptr<securegcm::UKey2Handshake> ukey2,
|
||||
const string& auth_token,
|
||||
const std::string& auth_token,
|
||||
const ByteArray& raw_auth_token) {
|
||||
response.client_status = Response::Status::kDone;
|
||||
response.latch.CountDown();
|
||||
},
|
||||
.on_failure_cb =
|
||||
[&response](const string& endpoint_id, EndpointChannel* channel) {
|
||||
[&response](const std::string& endpoint_id,
|
||||
EndpointChannel* channel) {
|
||||
response.client_status = Response::Status::kFailed;
|
||||
response.latch.CountDown();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user