Implement CountDownLatch for CrOS Nearby

This CL includes the implementation class for the abstract class
CountDownLatch defined in the Nearby library. It is a synchronization
aid that allows one or more threads to wait until a set of operations
being performed in other threads completes.

Because the actual Nearby library has yet to be merged into the CrOS
directory, this CL includes stand-in Nearby abstract classes under
the temporary directory //chromeos/components/nearby/library.
This directory will be removed after the Nearby library gets imported
to //third_party (in-progress CL:

Bug: 861813
Change-Id: I8d018e16a83760fae23acb0f2f3d92dee88ce9bc
Commit-Queue: Kyle Qian <>
Reviewed-by: Kyle Horimoto <>
Cr-Commit-Position: refs/heads/master@{#575737}
7 files changed