Commit 3f78d6a0 authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Avoid name-based dedupping of target sharing devices

This relands the full logic in
https://chromium-review.googlesource.com/c/chromium/src/+/1721379 which
got reverted due to issues on Android (source device listed as target
device).

Note that the non-problematic bits of the original patch (that got
reverted) have been committed in
https://chromium-review.googlesource.com/c/chromium/src/+/1828817, which
did NOT remove the name-based dedupping as fallback mechanism.

In this patch, such name-based fallback is removed and the code now
fully relies on GUID-based dedupping. It has been manually tested on
Android and the issue that caused the revert does not reproduce.

Bug: 991943,966413
Change-Id: Ia964d5fae36f5d9ad267a882dbda27ac578d4351
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1835575Reviewed-by: default avatarRamya Nagarajan <ramyan@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703208}
parent 51ad52a8
......@@ -740,16 +740,7 @@ void SendTabToSelfBridge::SetTargetDeviceInfoList() {
continue;
}
// Don't include this device. Also compare the name as the device can have
// different cache guids (e.g. after stopping and re-starting sync).
// TODO(crbug.com/991943): This shouldn't be required now that
// IsRecentLocalCacheGuid() is used above. However, issues have been
// observed on Android, as if IsRecentLocalCacheGuid() didn't get populated
// reliably.
if (device->guid() == change_processor()->TrackedCacheGuid() ||
device->client_name() == local_device_name_) {
continue;
}
DCHECK_NE(device->guid(), change_processor()->TrackedCacheGuid());
// Don't include devices that have disabled the send tab to self receiving
// feature.
......
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