@@ -91,9 +91,9 @@ using ::location::nearby::proto::connections::START_CLIENT_SESSION;
91
91
using ::location::nearby::proto::connections::START_STRATEGY_SESSION;
92
92
using ::location::nearby::proto::connections::STOP_CLIENT_SESSION;
93
93
using ::location::nearby::proto::connections::STOP_STRATEGY_SESSION;
94
- using ::location::nearby::proto::connections::STREAM;
95
94
using ::location::nearby::proto::connections::StopAdvertisingReason;
96
95
using ::location::nearby::proto::connections::StopDiscoveringReason;
96
+ using ::location::nearby::proto::connections::STREAM;
97
97
using ::location::nearby::proto::connections::UNFINISHED;
98
98
using ::location::nearby::proto::connections::UNFINISHED_ERROR;
99
99
using ::location::nearby::proto::connections::UNKNOWN_MEDIUM;
@@ -108,7 +108,7 @@ using SafeDisconnectionResult = ::location::nearby::analytics::proto::
108
108
ConnectionsLog::EstablishedConnection::SafeDisconnectionResult;
109
109
110
110
// TODO(edwinwu): Add ifttt in Android counterpart.
111
- OperationResultCategory GetOperationResultCateory (
111
+ OperationResultCategory ConvertToOperationResultCateory (
112
112
OperationResultCode result_code) {
113
113
if (result_code == OperationResultCode::DETAIL_SUCCESS) {
114
114
return OperationResultCategory::CATEGORY_SUCCESS;
@@ -301,7 +301,7 @@ void AnalyticsRecorder::OnStopDiscovery() {
301
301
if (!CanRecordAnalyticsLocked (" OnStopDiscovery" )) {
302
302
return ;
303
303
}
304
- RecordDiscoveryPhaseDurationAndReasonLocked (/* on_stop=*/ true );
304
+ RecordDiscoveryPhaseDurationAndReasonLocked (/* on_stop=*/ true );
305
305
}
306
306
307
307
void AnalyticsRecorder::OnStartedIncomingConnectionListening (
@@ -501,7 +501,7 @@ void AnalyticsRecorder::OnIncomingConnectionAttemptLocked(
501
501
std::make_unique<ConnectionsLog::OperationResult>();
502
502
operation_result_proto->set_result_code (
503
503
connection_attempt_metadata_params->operation_result_code );
504
- operation_result_proto->set_result_category (GetOperationResultCateory (
504
+ operation_result_proto->set_result_category (ConvertToOperationResultCateory (
505
505
connection_attempt_metadata_params->operation_result_code ));
506
506
connection_attempt->set_allocated_operation_result (
507
507
operation_result_proto.release ());
@@ -589,7 +589,7 @@ void AnalyticsRecorder::OnOutgoingConnectionAttemptLocked(
589
589
std::make_unique<ConnectionsLog::OperationResult>();
590
590
operation_result_proto->set_result_code (
591
591
connection_attempt_metadata_params->operation_result_code );
592
- operation_result_proto->set_result_category (GetOperationResultCateory (
592
+ operation_result_proto->set_result_category (ConvertToOperationResultCateory (
593
593
connection_attempt_metadata_params->operation_result_code ));
594
594
connection_attempt->set_allocated_operation_result (
595
595
operation_result_proto.release ());
@@ -1144,7 +1144,7 @@ void AnalyticsRecorder::FinishDiscoveryPhaseLocked() {
1144
1144
MarkConnectionRequestIgnoredLocked (connection_request.get ());
1145
1145
UpdateDiscovererConnectionRequestLocked (connection_request.get ());
1146
1146
}
1147
- RecordDiscoveryPhaseDurationAndReasonLocked (/* on_stop=*/ false );
1147
+ RecordDiscoveryPhaseDurationAndReasonLocked (/* on_stop=*/ false );
1148
1148
*current_strategy_session_->add_discovery_phase () =
1149
1149
*std::move (current_discovery_phase_);
1150
1150
}
@@ -1323,7 +1323,7 @@ void AnalyticsRecorder::FinishUpgradeAttemptLocked(
1323
1323
std::make_unique<ConnectionsLog::OperationResult>();
1324
1324
operation_result_proto->set_result_code (operation_result_code);
1325
1325
operation_result_proto->set_result_category (
1326
- GetOperationResultCateory (operation_result_code));
1326
+ ConvertToOperationResultCateory (operation_result_code));
1327
1327
attempt->set_allocated_operation_result (operation_result_proto.release ());
1328
1328
*current_strategy_session_->add_upgrade_attempt () = *attempt;
1329
1329
if (erase_item) {
@@ -1426,7 +1426,7 @@ ConnectionsLog::Payload AnalyticsRecorder::PendingPayload::GetProtoPayload(
1426
1426
std::make_unique<ConnectionsLog::OperationResult>();
1427
1427
operation_result_proto->set_result_code (operation_result_code_);
1428
1428
operation_result_proto->set_result_category (
1429
- GetOperationResultCateory (operation_result_code_));
1429
+ ConvertToOperationResultCateory (operation_result_code_));
1430
1430
payload.set_allocated_operation_result (operation_result_proto.release ());
1431
1431
1432
1432
return payload;
@@ -1696,6 +1696,11 @@ AnalyticsRecorder::LogicalConnection::GetPendingPayloadResultCodeFromReason(
1696
1696
}
1697
1697
}
1698
1698
1699
+ OperationResultCategory AnalyticsRecorder::GetOperationResultCateory (
1700
+ location::nearby::proto::connections::OperationResultCode result_code) {
1701
+ return ConvertToOperationResultCateory (result_code);
1702
+ }
1703
+
1699
1704
void AnalyticsRecorder::Sync () {
1700
1705
CountDownLatch latch (1 );
1701
1706
serial_executor_.Execute ([&]() { latch.CountDown (); });
0 commit comments