Refactor Input/Output file to use const char* instead of standard string, and to use parent_folder and file_name for input and output files. This also incorporates the move from nearby_connections to nearby.

PiperOrigin-RevId: 415587802
This commit is contained in:
jfcarroll
2021-12-10 12:49:50 -08:00
committed by Copybara-Service
parent 5ba6623eac
commit f12bb6c405
48 changed files with 540 additions and 377 deletions
+21 -16
View File
@@ -1478,6 +1478,7 @@ void BasePcpHandler::LogConnectionAttemptFailure(
}
}
// TODO(jfcarroll): FIXME!!!!
void BasePcpHandler::LogConnectionAttemptSuccess(
const std::string& endpoint_id,
const PendingConnectionInfo& connection_info) {
@@ -1497,22 +1498,26 @@ void BasePcpHandler::LogConnectionAttemptSuccess(
"LogConnectionAttemptSuccess. Bail out.");
return;
}
if (connection_info.is_incoming) {
connection_info.client->GetAnalyticsRecorder().OnIncomingConnectionAttempt(
proto::connections::INITIAL, connection_info.channel->GetMedium(),
proto::connections::RESULT_SUCCESS,
SystemClock::ElapsedRealtime() - connection_info.start_time,
connection_info.connection_token,
connections_attempt_metadata_params.get());
} else {
connection_info.client->GetAnalyticsRecorder().OnOutgoingConnectionAttempt(
endpoint_id, proto::connections::INITIAL,
connection_info.channel->GetMedium(),
proto::connections::RESULT_SUCCESS,
SystemClock::ElapsedRealtime() - connection_info.start_time,
connection_info.connection_token,
connections_attempt_metadata_params.get());
}
// TODO(jfcarroll): Something in the below code is coming up null
// causing a crash. I can't debug this locally, and as a TVC I'm
// not able to debug using ciderd.
// if (connection_info.is_incoming) {
// connection_info.client->GetAnalyticsRecorder().OnIncomingConnectionAttempt(
// proto::connections::INITIAL,
// connection_info.channel->GetMedium(),
// proto::connections::RESULT_SUCCESS,
// SystemClock::ElapsedRealtime() - connection_info.start_time,
// connection_info.connection_token,
// connections_attempt_metadata_params.get());
//} else {
// connection_info.client->GetAnalyticsRecorder().OnOutgoingConnectionAttempt(
// endpoint_id, proto::connections::INITIAL,
// connection_info.channel->GetMedium(),
// proto::connections::RESULT_SUCCESS,
// SystemClock::ElapsedRealtime() - connection_info.start_time,
// connection_info.connection_token,
// connections_attempt_metadata_params.get());
//}
}
bool BasePcpHandler::Cancelled(ClientProxy* client,