chromium/chrome/browser/password_manager/android/protos/password_with_local_data.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.

// If you change or add any fields in this file, update proto_visitors.h and
// potentially proto_enum_conversions.{h, cc}.

syntax = "proto2";

option java_multiple_files = true;
option java_package = "org.chromium.components.password_manager.core.browser.proto";

option optimize_for = LITE_RUNTIME;

package password_manager;

import "components/sync/protocol/password_specifics.proto";

// Wrapper for a set of credentials that consists of (possibly) synced password
// data and local data that is exclusively read and modified by Chrome.
message PasswordWithLocalData {
  // A potentially synced set of credentials.
  optional sync_pb.PasswordSpecificsData password_specifics_data = 1;

  reserved 2;
  reserved "local_chrome_data";

  // Local data that is related to the `password_specifics_data`. Although it is
  // stored close to the `password_specifics_data`, it always stays local to the
  // device the password is stored on and is never synced.
  message LocalData {
    // Metadata that is opaque to the provider. The provider does not read,
    // modify or interpret it, only Chrome does. This data will for example
    // contain `FormData` or device-specific properties like
    // `PasswordForm::skip_zero_click` that prevents a credential to be used for
    // Credential Management requests on this device.
    optional bytes opaque_metadata = 1;

    // Email address of the last sync account this password was associated with.
    // This field is maintained by Chrome as well as by the provider.
    // This field is present only if the password is NOT currently associated
    // with a syncing account AND it was associated with one in the past.
    // E.g. [email protected] (lowercase and canonicalized).
    optional string previously_associated_sync_account_email = 2;
  }

  optional LocalData local_data = 3;
}