diff options
author | Yuri Wiitala <miu@chromium.org> | 2020-11-30 08:13:53 -0800 |
---|---|---|
committer | Yuri Wiitala <miu@chromium.org> | 2020-11-30 20:03:13 +0000 |
commit | c6465ca683e686cd7f7dfa347e86451425e7af25 (patch) | |
tree | 71d7a43bb08d7d94d576e55c0e5ef0c0c5876040 /cast/sender/cast_platform_client_unittest.cc | |
parent | 9be11f7d2b44dff83dc88dff054b967a43f319cc (diff) | |
download | openscreen-c6465ca683e686cd7f7dfa347e86451425e7af25.tar.gz |
Remote virtual connections [1/3]: Refactor VCRouter to extend VCManager.
This is a clean-up patch to simplify code structure. Before this patch,
all clients of VirtualConnectionRouter need to instantiate both a
VirtualConnectionManager and a VirtualConnectionRouter, and then pass
the former (by pointer) to the latter. After this patch, VCR extends
VCM, and clients need not worry about a VCM.
Bug: b/162542369
Change-Id: I0dff69819d9b5282a43643a2da0fe33e7bf0a3fd
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2546803
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
Diffstat (limited to 'cast/sender/cast_platform_client_unittest.cc')
-rw-r--r-- | cast/sender/cast_platform_client_unittest.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cast/sender/cast_platform_client_unittest.cc b/cast/sender/cast_platform_client_unittest.cc index eaaf5c6e..ae721a15 100644 --- a/cast/sender/cast_platform_client_unittest.cc +++ b/cast/sender/cast_platform_client_unittest.cc @@ -4,9 +4,10 @@ #include "cast/sender/cast_platform_client.h" +#include <utility> + #include "cast/common/channel/testing/fake_cast_socket.h" #include "cast/common/channel/testing/mock_socket_error_handler.h" -#include "cast/common/channel/virtual_connection_manager.h" #include "cast/common/channel/virtual_connection_router.h" #include "cast/common/public/service_info.h" #include "cast/sender/testing/test_helpers.h" @@ -46,12 +47,10 @@ class CastPlatformClientTest : public ::testing::Test { FakeCastSocketPair fake_cast_socket_pair_; CastSocket* socket_ = nullptr; MockSocketErrorHandler mock_error_handler_; - VirtualConnectionManager manager_; - VirtualConnectionRouter router_{&manager_}; + VirtualConnectionRouter router_; FakeClock clock_{Clock::now()}; FakeTaskRunner task_runner_{&clock_}; - CastPlatformClient platform_client_{&router_, &manager_, &FakeClock::now, - &task_runner_}; + CastPlatformClient platform_client_{&router_, &FakeClock::now, &task_runner_}; ServiceInfo receiver_; }; |