chromium/components/power_bookmarks/core/proto/shopping_specifics.proto

// Copyright 2021 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 java_multiple_files = true;
option java_package = "org.chromium.components.power_bookmarks";

option optimize_for = LITE_RUNTIME;

package power_bookmarks;

// This message is the local representation of shopping information
// tied to a bookmark (and kept in PowerBookmarkMeta).
message ShoppingSpecifics {
  // The title of the product.
  optional string title = 1;

  // Direct link to the product image.
  optional string image_url = 2;

  // Price as shown in the page.
  optional ProductPrice current_price = 3;

  // Cluster id.
  optional uint64 product_cluster_id = 4;

  // Whether the product is currently being tracked.
  optional bool is_price_tracked = 5 [deprecated = true];

  // The offer id for the product.
  optional fixed64 offer_id = 6;

  // The country code of the offer.
  optional string country_code = 7;

  // The locale of the offer.
  optional string locale = 11;

  // The previous price of the product if available. This value can be used
  // for price change events when compared to |current_price|.
  optional ProductPrice previous_price = 8;

  // Last time the product is successfully tracked or untracked by the user,
  // represented as microseconds since the Windows epoch.
  optional int64 last_subscription_change_time = 9;

  // Whether the bookmark was created from an explicit price tracking UI rather
  // than from bookmark UI.
  optional bool bookmark_created_by_price_tracking = 10;
}

message ProductPrice {
  // Code for the currency e.g. USD.
  optional string currency_code = 1;

  // Price in micros.
  optional int64 amount_micros = 2;
}