Commit 0086b1f3 authored by Himanshu Jaju's avatar Himanshu Jaju Committed by Commit Bot

Refactor NearbySharingServiceImplUnittest for IncomingConnections

- Extract common set up for incoming connections
- Extract common set up for accept / reject flows
- Add a TODO for fetching certificate for outgoing share target based on parent CL

Bug: 1085068
Change-Id: I3b3e322026c3cfe2fe86808f92bfd0b1d810f94b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2344604
Commit-Queue: Himanshu Jaju <himanshujaju@chromium.org>
Reviewed-by: default avatarRichard Knoll <knollr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796503}
parent 66aa2d4c
...@@ -568,9 +568,10 @@ void NearbySharingServiceImpl::OnOutgoingAdvertisementDecoded( ...@@ -568,9 +568,10 @@ void NearbySharingServiceImpl::OnOutgoingAdvertisementDecoded(
// Once get the advertisement, first thing to do is to decrypt its device name // Once get the advertisement, first thing to do is to decrypt its device name
// based on its visibility and create a ShareTarget to represent this remote // based on its visibility and create a ShareTarget to represent this remote
// device. // device.
base::Optional<ShareTarget> share_target = // TODO(nmusgrave): Use valid certificate from certificate manager.
CreateShareTarget(endpoint_id, std::move(advertisement), base::nullopt, base::Optional<ShareTarget> share_target = CreateShareTarget(
/*is_incoming=*/false); endpoint_id, std::move(advertisement), /*certificate=*/base::nullopt,
/*is_incoming=*/false);
if (!share_target) { if (!share_target) {
NS_LOG(VERBOSE) << __func__ NS_LOG(VERBOSE) << __func__
<< ": Failed to convert advertisement to share target from " << ": Failed to convert advertisement to share target from "
......
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