• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2022 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 use base::Tube;
6 
7 use crate::protos::event_details::RecordDetails;
8 use crate::MetricEventType;
9 use crate::MetricsClientDestructor;
10 
11 /// This interface exists to be used and re-implemented by downstream forks. Updates shouldn't be
12 /// done without ensuring they won't cause breakages in dependent codebases.
initialize(_: Tube)13 pub fn initialize(_: Tube) {}
14 #[cfg(test)]
force_initialize(_: Tube)15 pub fn force_initialize(_: Tube) {}
get_destructor() -> MetricsClientDestructor16 pub fn get_destructor() -> MetricsClientDestructor {
17     MetricsClientDestructor::new(|| {})
18 }
is_initialized() -> bool19 pub fn is_initialized() -> bool {
20     false
21 }
set_auth_token(_: &str)22 pub fn set_auth_token(_: &str) {}
set_graphics_api(_: &str)23 pub fn set_graphics_api(_: &str) {}
set_package_name(_: &str)24 pub fn set_package_name(_: &str) {}
merge_session_invariants(_: &[u8])25 pub fn merge_session_invariants(_: &[u8]) {}
log_descriptor(_: MetricEventType, _: i64)26 pub fn log_descriptor(_: MetricEventType, _: i64) {}
log_event(_: MetricEventType)27 pub fn log_event(_: MetricEventType) {}
log_metric(_: MetricEventType, _: i64)28 pub fn log_metric(_: MetricEventType, _: i64) {}
log_histogram_metric(_: MetricEventType, _: i64)29 pub fn log_histogram_metric(_: MetricEventType, _: i64) {}
log_high_frequency_descriptor_event(_: MetricEventType, _: i64, _: i64)30 pub fn log_high_frequency_descriptor_event(_: MetricEventType, _: i64, _: i64) {}
log_event_with_details(_: MetricEventType, _: &RecordDetails)31 pub fn log_event_with_details(_: MetricEventType, _: &RecordDetails) {}
32