// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file was exported from google3, do not edit manually.
// See README.chromium for details.

edition = "2023";

option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.metrics";

package private_metrics;

import "third_party/metrics_proto/private_metrics/system_profiles/rc_coarse_system_profile.proto";
import "third_party/metrics_proto/private_metrics/system_profiles/search_system_profile.proto";
import "third_party/metrics_proto/histogram_event.proto";

// Private user metrics.
// This is the top-level log proto for PUMA logs.
// Next tag: 6
message PrivateUserMetrics {
  // The PrivateUserMetrics client_id. Not joinable with UMA / UKM or any other
  // client ids.
  fixed64 client_id = 1;

  // This field is deprecated in favor of profile_keyed_histogram_events.
  // A list of histogram events, which is the actual metric data
  // being reported.
  repeated metrics.HistogramEventProto histogram_events = 2;

  // Only one system profile type can be set.
  oneof system_profile {
    RcCoarseSystemProfile rc_profile = 3;
    SearchSystemProfile search_profile = 4;
  }

  // A list of profile keyed histogram events, which is the actual metric data
  // being reported.
  repeated ProfileKeyedHistogramEvent profile_keyed_histogram_events = 5;
}

message ProfileKeyedHistogramEvent {
  // The profile id which keys the histogram events. Not joinable with any other
  // profile ids. This field is semantically optional. In the absence of a value
  // or if the value is zero, we are collecting per-client metrics.
  fixed64 profile_id = 1;

  // A list of histogram events which is the actual metric data being reported.
  repeated metrics.HistogramEventProto histogram_events = 2;
}
