From 88f81f8a7247fa5ce190cdfef15aaeb4c4853a02 Mon Sep 17 00:00:00 2001 From: Francis Tsui Date: Wed, 16 Oct 2024 15:42:27 -0700 Subject: [PATCH] Add RPC logging. PiperOrigin-RevId: 686667172 --- internal/platform/BUILD | 2 +- sharing/nearby_sharing_service.h | 4 ++-- sharing/nearby_sharing_service_impl.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/platform/BUILD b/internal/platform/BUILD index 9ab66b12de4..98c92c00c6f 100644 --- a/internal/platform/BUILD +++ b/internal/platform/BUILD @@ -261,7 +261,7 @@ cc_library( "//internal/weave:__subpackages__", "//location/nearby/apps:__subpackages__", "//location/nearby/cpp:__subpackages__", - "//location/nearby/sharing/sdk/test_client:__pkg__", + "//location/nearby/sharing/sdk:__subpackages__", "//location/nearby/testing/nearby_native:__subpackages__", "//presence:__subpackages__", "//sharing:__subpackages__", diff --git a/sharing/nearby_sharing_service.h b/sharing/nearby_sharing_service.h index 87c7efd91dd..2454bc7089b 100644 --- a/sharing/nearby_sharing_service.h +++ b/sharing/nearby_sharing_service.h @@ -22,14 +22,13 @@ #include "absl/base/attributes.h" #include "absl/functional/any_invocable.h" -#include "absl/strings/string_view.h" #include "absl/time/time.h" +#include "internal/platform/clock.h" #include "sharing/advertisement.h" #include "sharing/attachment_container.h" #include "sharing/internal/api/sharing_rpc_notifier.h" #include "sharing/local_device_data/nearby_share_local_device_data_manager.h" #include "sharing/nearby_sharing_settings.h" -#include "sharing/share_target.h" #include "sharing/share_target_discovered_callback.h" #include "sharing/transfer_update_callback.h" @@ -255,6 +254,7 @@ class NearbySharingService { virtual NearbyShareContactManager* GetContactManager() = 0; virtual NearbyShareCertificateManager* GetCertificateManager() = 0; virtual AccountManager* GetAccountManager() = 0; + virtual Clock& GetClock() = 0; }; } // namespace sharing diff --git a/sharing/nearby_sharing_service_impl.h b/sharing/nearby_sharing_service_impl.h index 1408e62ceaf..991f4578e8e 100644 --- a/sharing/nearby_sharing_service_impl.h +++ b/sharing/nearby_sharing_service_impl.h @@ -35,6 +35,7 @@ #include "absl/time/time.h" #include "absl/types/span.h" #include "internal/base/observer_list.h" +#include "internal/platform/clock.h" #include "internal/platform/device_info.h" #include "internal/platform/implementation/account_manager.h" #include "internal/platform/task_runner.h" @@ -171,6 +172,7 @@ class NearbySharingServiceImpl NearbyShareContactManager* GetContactManager() override; NearbyShareCertificateManager* GetCertificateManager() override; AccountManager* GetAccountManager() override; + Clock& GetClock() override { return *context_->GetClock(); } // NearbyConnectionsManager::IncomingConnectionListener: void OnIncomingConnection(absl::string_view endpoint_id,