Commit a1e2ad67 authored by Josh Nohle's avatar Josh Nohle Committed by Commit Bot

[Nearby] Correct UpdateDevice RPC field mask strings

Correct the values used in the FieldMask |update_mask| field in the
UpdateDeviceRequest proto. With these changes, we manually verified that
the contacts and public certificates fields in the UpdateDevice response
now show the expected changes in the Nearby Share server database. The
values in this CL agree with those in GmsCore [1].

[1]http://google3/java/com/google/android/gmscore/integ/modules/nearby/src/com/google/android/gms/nearby/sharing/rpc/NearbySharingServiceGrpcClient.java?l=59-61&rcl=330996445

Bug: b/157685298
Change-Id: I5c7d669825cc0ff667cdaf17eb09b26f9f999327
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2411449
Auto-Submit: Josh Nohle <nohle@chromium.org>
Commit-Queue: James Vecore <vecore@google.com>
Reviewed-by: default avatarJames Vecore <vecore@google.com>
Cr-Commit-Position: refs/heads/master@{#806918}
parent bd568189
......@@ -12,8 +12,8 @@
namespace {
const char kDeviceIdPrefix[] = "users/me/devices/";
const char kContactsFieldMaskPath[] = "device.contacts";
const char kCertificatesFieldMaskPath[] = "device.public_certificates";
const char kContactsFieldMaskPath[] = "contacts";
const char kCertificatesFieldMaskPath[] = "public_certificates";
void RecordResultMetrics(NearbyShareHttpResult result) {
base::UmaHistogramEnumeration(
......
......@@ -80,9 +80,9 @@ void VerifyRequest(
field_mask.size());
EXPECT_EQ(expected_contacts.has_value(),
base::Contains(field_mask, "device.contacts"));
base::Contains(field_mask, "contacts"));
EXPECT_EQ(expected_certificates.has_value(),
base::Contains(field_mask, "device.public_certificates"));
base::Contains(field_mask, "public_certificates"));
EXPECT_EQ(std::string(kDeviceIdPrefix) + kTestDeviceId,
request.device().name());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment