// 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;

option features.enum_type = CLOSED;

// All fields in this message should be populated by the client before sending
// the report to comply with the entropy requirements (an unset field
// essentially increases entropy).
// Next tag: 7
message CoarseSystemProfile {
  // Stable or not-stable channel, 1 bit allocated.
  ChannelType channel = 1;

  // Platform and activity type, 4 bits allocated.
  Platform platform = 2;

  // Geo designation, 1 bit allocated.
  // GEO_DESIGNATION_INVALID is an invalid value and should never used. The
  // client should check the value before sending the report.
  enum GeoDesignation {
    GEO_DESIGNATION_INVALID = 0;
    GEO_DESIGNATION_EEA = 1;  // Countries under the European Economic Area.
    GEO_DESIGNATION_ROW = 2;  // Rest of the world.
  }

  GeoDesignation geo_designation = 3;

  // An indicator of whether this is a recent (week old) client install or
  // not, 1 bit allocated.
  // Note that what "recent" means could potentially change in the future
  // without changing the enum value as that would increase entropy.
  // When analyzing data, always check for changes in what recent means for
  // each milestone.
  // CLIENT_AGE_INVALID is an invalid value and should never used. The client
  // should check the value before sending the report.
  enum ClientAge {
    CLIENT_AGE_INVALID = 0;
    CLIENT_AGE_RECENT = 1;
    CLIENT_AGE_NOT_RECENT = 2;
  }

  ClientAge client_age = 4;

  // First 3 digits of the milestone mod (%) 16, 4 bits allocated.
  int32 milestone_prefix_trimmed = 5;

  // Whether UKM logging is enabled, 1 bit allocated.
  bool is_ukm_enabled = 6;
}

// Stable or not-stable channel, 1 bit allocated.
// CHANNEL_INVALID is an invalid value and should never used. The client
// should check the value before sending the report.
enum ChannelType {
  CHANNEL_INVALID = 0;
  CHANNEL_STABLE = 1;
  CHANNEL_NOT_STABLE = 2;
}

// Platform and activity type, 4 bits allocated.
// PLATFORM_INVALID is an invalid value and should never used. The client
// should check the value before sending the report.
enum Platform {
  PLATFORM_INVALID = 0;
  PLATFORM_OTHER = 1;
  PLATFORM_ANDROID_WEBVIEW = 2;
  PLATFORM_ANDROID_BROWSER_APP = 3;
  PLATFORM_ANDROID_CCT = 4;
  PLATFORM_ANDROID_PWA = 5;
  PLATFORM_ANDROID_TWA = 6;
  PLATFORM_IOS = 7;
  PLATFORM_WINDOWS = 8;
  PLATFORM_MACOS = 9;
  PLATFORM_LINUX = 10;
  PLATFORM_CHROMEOS = 11;
  PLATFORM_ANDROID = 12;
}
