chromium/components/optimization_guide/proto/features/wallpaper_search.proto

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

syntax = "proto3";

package optimization_guide.proto;

import "components/optimization_guide/proto/features/common_quality_data.proto";

option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.optimization_guide.features.proto";

option java_outer_classname = "WallpaperSearchProto";

// DO NOT EDIT THIS FILE DIRECTLY!
//
// This file is generated in g3 and then synced to Chrome. Instead, please
// refer to http://go/chrome-intelligence-feature-protos (Google-internal link),
// and then changes will be synced with Chrome automatically.

message WallpaperSearchLoggingData {
  WallpaperSearchRequest request = 1;

  WallpaperSearchResponse response = 2;

  WallpaperSearchQuality quality = 3;
}

// Next ID: 3
message WallpaperSearchRequest {
  // The prompt built by selectors.
  Descriptors descriptors = 2;

  reserved 1;
}

// Next ID: 5
message Descriptors {
  // The subject to be featured.
  string subject = 1;

  // The art style of the image.
  string style = 2;

  // The general mood of the image.
  string mood = 3;

  // A color to be featured in the image.
  string color = 4;
}

// Next ID: 3
message WallpaperSearchResponse {
  // The images returned for the request.
  repeated Image images = 2;

  reserved 1;
}

// Next ID: 3
message Image {
  bytes encoded_image = 1;

  int64 image_id = 2;
}

// Data logged for each Theme Response by a client.
// Next ID: 8
message WallpaperSearchQuality {
  // A session starts when opening Panorama and ends when closing Panorama.
  // Multiple WallpaperSearchQuality can have the same session_id.
  int64 session_id = 1;

  // Per image data.
  repeated WallpaperSearchImageQuality images_quality = 2;

  // Index, in chronological order, of the returned Themes Set within one
  // session.
  int32 index = 3;

  // Whether the user thumbs upped or downed the Theme Set.
  UserFeedback user_feedback = 4;

  // False, if the user clicked regenerate when this Theme Response was shown.
  // True, if the user ended the Session while this Theme Response was shown.
  bool final_request_in_session = 5;

  // Duration, in milliseconds, from requesting the Theme Response until the
  // response arrives at the client.
  int32 request_latency_ms = 6;

  // Duration, in milliseconds, from showing Theme Response until the user
  // regenerates or ends the Session.
  int32 complete_latency_ms = 7;
}

// Data logged for each Theme Image by client.
// Next ID: 5
message WallpaperSearchImageQuality {
  // ID associated with a specific model pipeline run. Each model pipeline run
  // has an ID and produces at most one image.
  int64 image_id = 1;

  // True, if the user selected the Theme Image from the Theme Response so it
  // appears on their NTP.
  bool previewed = 2;

  // True, if the Theme Image was selected as the background when the Session
  // ends.
  bool selected = 3;

  // Duration, in milliseconds, from showing the Theme Image until the user
  // previews the Theme Image. Only set if "selected" is true.
  optional int32 preview_latency_ms = 4;
}