chromium/components/segmentation_platform/public/proto/segmentation_platform.proto

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

syntax = "proto2";
option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.segmentation_platform.proto";
option java_outer_classname = "SegmentationProto";

package segmentation_platform.proto;

// List of user segment types.
// There are two types of user segments:
//   - Server model segments: These segments support receiving updated models
//     from a server, and its values must be less than MAX_OPTIMIZATION_TARGET.
//   - Default model segments: These segments only support a client-side default
//     model, its values must be greater than MAX_OPTIMIZATION_TARGET.
//
// All new SegmentIds should be added to the following locations:
//   1. The list of segmentation client keys in
//      components/segmentation_platform/public/constants.h.
//   2. Histogram variant must be added to SegmentationModel in
//      tools/metrics/histograms/metadata/segmentation_platform/histograms.xml.
//
// New server model segments must be added to the following locations:
//   - OptimizationTargetProto in
//     components/optimization_guide/proto/models.proto.
//   - SegmentationPlatformSegmentationModel enum in
//     tools/metrics/histograms/enums.xml
enum SegmentId {
  // Reserved fields are `OptimizationTarget`s that are not used by segmentation
  // to prevent accidental misuse.
  reserved 1, 2, 3, 7, 8, 9, 13, 14, 15, 19, 20, 24, 25, 26, 30, 31, 33, 34, 35,
      36, 39, 40, 42, 43, 44, 47, 48, 49;

  OPTIMIZATION_TARGET_UNKNOWN = 0;
  // Target for segmentation: New tab page user.
  OPTIMIZATION_TARGET_SEGMENTATION_NEW_TAB = 4;
  // Target for segmentation: Share user.
  OPTIMIZATION_TARGET_SEGMENTATION_SHARE = 5;
  // Target for segmentation: Voice user.
  OPTIMIZATION_TARGET_SEGMENTATION_VOICE = 6;
  // Target that enables data collection on client side for various experiments.
  OPTIMIZATION_TARGET_SEGMENTATION_DUMMY = 10;
  // Target for segmentation: Chrome Android Start user.
  OPTIMIZATION_TARGET_SEGMENTATION_CHROME_START_ANDROID = 11;
  // Target for segmentation: Query Tiles user.
  OPTIMIZATION_TARGET_SEGMENTATION_QUERY_TILES = 12;
  // Target for segmentation: Determine users with low engagement with chrome.
  OPTIMIZATION_TARGET_SEGMENTATION_CHROME_LOW_USER_ENGAGEMENT = 16;
  // Target for segmentation: Determine users who prefer to use Feed.
  OPTIMIZATION_TARGET_SEGMENTATION_FEED_USER = 17;
  // Target for price tracking action when shown as a contextual page action.
  OPTIMIZATION_TARGET_CONTEXTUAL_PAGE_ACTION_PRICE_TRACKING = 18;
  // Target for segmentation: Determine users who are interested in shopping.
  OPTIMIZATION_TARGET_SEGMENTATION_SHOPPING_USER = 21;
  // Target for segmentation: Chrome Android Start user V2.
  OPTIMIZATION_TARGET_SEGMENTATION_CHROME_START_ANDROID_V2 = 22;
  // Target for segmentation: Determine users who frequently search.
  OPTIMIZATION_TARGET_SEGMENTATION_SEARCH_USER = 23;
  // Target for segmentation: Segment of users who switched devices.
  OPTIMIZATION_TARGET_SEGMENTATION_DEVICE_SWITCHER = 27;
  // Target for segmentation: Adaptive toolbar.
  OPTIMIZATION_TARGET_SEGMENTATION_ADAPTIVE_TOOLBAR = 28;
  // Target for segmentation: Determine users who are tabletproductivity users.
  OPTIMIZATION_TARGET_SEGMENTATION_TABLET_PRODUCTIVITY_USER = 29;
  // Target for web app install promotion.
  OPTIMIZATION_TARGET_WEB_APP_INSTALLATION_PROMO = 32;
  // Target for ios module ranker.
  OPTIMIZATION_TARGET_SEGMENTATION_IOS_MODULE_RANKER = 37;
  // Target for segmentation: Determine what modules a user should see on their
  // Desktop New Tab Page.
  OPTIMIZATION_TARGET_SEGMENTATION_DESKTOP_NTP_MODULE = 38;
  // Target for android home module ranker.
  OPTIMIZATION_TARGET_SEGMENTATION_ANDROID_HOME_MODULE_RANKER = 41;
  // Target to determine whether to show promotion for Compose.
  OPTIMIZATION_TARGET_SEGMENTATION_COMPOSE_PROMOTION = 45;
  // Target for ranking URL visits used in visit resumption features.
  OPTIMIZATION_TARGET_URL_VISIT_RESUMPTION_RANKER = 46;
  // Target for metrics based segmentation clustering.
  OPTIMIZATION_TARGET_SEGMENTATION_METRICS_CLUSTERING = 50;
  // Add new entries to OptimizationTarget proto.

  // New entries should start from a 1000 if OptimizationTarget does not
  // have a corresponding type.
  MAX_OPTIMIZATION_TARGET = 999;

  // Determine power users of the browser app.
  POWER_USER_SEGMENT = 1000;
  // Determine users active on multiple synced devices.
  CROSS_DEVICE_USER_SEGMENT = 1001;
  // User segment that regularly use chrome features.
  FREQUENT_FEATURE_USER_SEGMENT = 1002;
  // Target for intentional users (people opening Chrome on their own instead of
  // arriving from other apps).
  INTENTIONAL_USER_SEGMENT = 1003;
  // User segment: User is more likely to use resume features in chrome..
  RESUME_HEAVY_USER_SEGMENT = 1004;
  // Determine device tiers for different user devices.
  DEVICE_TIER_SEGMENT = 1005;
  // Determine if a tab is likely to be resumed.
  TAB_RESUMPTION_CLASSIFIER = 1006;
  // Segment for users who use password manager features.
  PASSWORD_MANAGER_USER = 1007;
  // Segment for users who use most visited tiles.
  MOST_VISITED_TILES_USER = 1008;
  // Default model used for tracking metrics used by DatabaseClient API.
  DATABASE_API_CLIENTS = 1009;
  // Test model for OPTIMIZATION_TARGET_SEGMENTATION_IOS_MODULE_RANKER
  OPTIMIZATION_TARGET_SEGMENTATION_IOS_MODULE_RANKER_TEST = 1010;
  // Model used for targeting and triggering ephemeral home module.
  EPHEMERAL_HOME_MODULE_BACKEND = 1011;
  // Test model for EPHEMERAL_HOME_MODULE_BACKEND.
  EPHEMERAL_HOME_MODULE_BACKEND_TEST = 1012;
};