#include "components/sharing_message/sharing_metrics.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "components/sharing_message/sharing_device_registration_result.h"
#include "components/version_info/version_info.h"
namespace {
const char* GetEnumStringValue(SharingFeatureName feature) { … }
std::string SharingChannelTypeToString(SharingChannelType channel_type) { … }
std::string DevicePlatformToString(SharingDevicePlatform device_platform) { … }
std::string PulseIntervalToString(base::TimeDelta pulse_interval) { … }
enum class SharingMajorVersionComparison { … };
}
std::string SharingSendMessageResultToString(SharingSendMessageResult result) { … }
sharing_message::MessageType SharingPayloadCaseToMessageType(
components_sharing_message::SharingMessage::PayloadCase payload_case) { … }
sharing_message::MessageType SharingPayloadCaseToMessageType(
sync_pb::UnencryptedSharingMessage::PayloadCase payload_case) { … }
const std::string& SharingMessageTypeToString(
sharing_message::MessageType message_type) { … }
int GenerateSharingTraceId() { … }
void LogSharingMessageReceived(
components_sharing_message::SharingMessage::PayloadCase payload_case) { … }
void LogSharingDevicesToShow(SharingFeatureName feature,
const char* histogram_suffix,
int count) { … }
void LogSharingAppsToShow(SharingFeatureName feature,
const char* histogram_suffix,
int count) { … }
void LogSharingSelectedIndex(SharingFeatureName feature,
const char* histogram_suffix,
int index,
SharingIndexType index_type) { … }
void LogSharingDialogShown(SharingFeatureName feature, SharingDialogType type) { … }
void LogSendSharingMessageResult(
sharing_message::MessageType message_type,
SharingDevicePlatform receiving_device_platform,
SharingChannelType channel_type,
base::TimeDelta pulse_interval,
SharingSendMessageResult result) { … }