#include "components/unified_consent/msbb_session_durations_metrics_recorder.h"
#include <string>
#include <string_view>
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "base/time/time.h"
namespace unified_consent {
namespace {
base::TimeDelta SubtractInactiveTime(base::TimeDelta total_length,
base::TimeDelta inactive_time) { … }
void LogDuration(std::string_view histogram_suffix,
base::TimeDelta session_length) { … }
}
MsbbSessionDurationsMetricsRecorder::MsbbSessionDurationsMetricsRecorder(
PrefService* pref_service)
: … { … }
MsbbSessionDurationsMetricsRecorder::~MsbbSessionDurationsMetricsRecorder() { … }
void MsbbSessionDurationsMetricsRecorder::OnSessionStarted(
base::TimeTicks session_start) { … }
void MsbbSessionDurationsMetricsRecorder::OnSessionEnded(
base::TimeDelta session_length) { … }
void MsbbSessionDurationsMetricsRecorder::
OnUrlKeyedDataCollectionConsentStateChanged(
UrlKeyedDataCollectionConsentHelper* consent_helper) { … }
void MsbbSessionDurationsMetricsRecorder::LogMsbbDuration(
bool msbb_enabled,
base::TimeDelta session_length) { … }
}