From ecb75d298682ca60a6979f92d838777b48d7db71 Mon Sep 17 00:00:00 2001 From: Guogang Li Date: Tue, 19 Nov 2024 00:45:32 -0800 Subject: [PATCH] Add parent folder when generating introduction frame PiperOrigin-RevId: 697908857 --- sharing/outgoing_share_session.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sharing/outgoing_share_session.cc b/sharing/outgoing_share_session.cc index 5466c61c..767b5bf3 100644 --- a/sharing/outgoing_share_session.cc +++ b/sharing/outgoing_share_session.cc @@ -139,11 +139,10 @@ void OutgoingShareSession::InitiateSendAttachments( set_session_id(analytics_recorder().GenerateNextId()); // Log analytics event of sending start. - analytics_recorder().NewSendStart( - session_id(), - /*transfer_position=*/1, - /*concurrent_connections=*/1, - share_target()); + analytics_recorder().NewSendStart(session_id(), + /*transfer_position=*/1, + /*concurrent_connections=*/1, + share_target()); } bool OutgoingShareSession::ProcessKeyVerificationResult( @@ -259,6 +258,7 @@ bool OutgoingShareSession::FillIntroductionFrame( file_metadata->set_type(file.type()); file_metadata->set_mime_type(std::string(file.mime_type())); file_metadata->set_size(file.size()); + file_metadata->set_parent_folder(std::string(file.parent_folder())); } // Write introduction of text payloads. @@ -449,8 +449,7 @@ OutgoingShareSession::HandleConnectionResponse( return std::nullopt; } case ConnectionResponseFrame::REJECT: - VLOG(1) - << "The connection was rejected. The connection has been closed."; + VLOG(1) << "The connection was rejected. The connection has been closed."; return TransferMetadata::Status::kRejected; case ConnectionResponseFrame::NOT_ENOUGH_SPACE: VLOG(1) << "The connection was rejected because the remote device does "