• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4//
5// Sync protocol datatype extension for autofill.
6
7// Update proto_value_conversions{.h,.cc,_unittest.cc} if you change
8// any fields in this file.
9
10syntax = "proto2";
11
12option optimize_for = LITE_RUNTIME;
13option retain_unknown_fields = true;
14
15package sync_pb;
16
17import "sync.proto";
18
19// Properties of autofill sync objects.
20
21// An AutofillProfile.
22message AutofillProfileSpecifics {
23  // User-defined label.
24  optional string label = 1;
25
26  optional string guid = 15;
27
28  // Contact info.
29  optional string name_first = 2;
30  optional string name_middle = 3;
31  optional string name_last = 4;
32  optional string email_address = 5;
33  optional string company_name = 6;
34
35  // Home address.
36  optional string address_home_line1 = 7;
37  optional string address_home_line2 = 8;
38  optional string address_home_city = 9;
39  optional string address_home_state = 10;
40  optional string address_home_zip = 11;
41  optional string address_home_country = 12;
42
43  // Phone + fax.
44  optional string phone_home_whole_number = 13;
45  optional string phone_fax_whole_number = 14;
46}
47
48message AutofillCreditCardSpecifics {
49  // User-defined label (e.g. Amazon Visa).
50  optional string label = 1;
51
52  // The cardholder's name.
53  optional string name_on_card = 2;
54
55  // The type, e.g. Mastercard.
56  optional string type = 3;
57
58  // The credit card number.
59  optional string card_number = 4;
60
61  // The expiration.
62  optional string expiration_month = 5;
63  optional string expiration_year = 6;
64
65  // The CVV.
66  optional string verification_code = 7;
67
68  // The label of the Autofill profile that contains the billing address.
69  optional string billing_address = 8;
70
71  // The label of the Autofill profile that contains the shipping address.
72  optional string shipping_address = 9;
73}
74
75message AutofillSpecifics {
76  // If any of these 3 fields are present, then all 3 should be, and it implies
77  // that this entity represents a classic autofill object.  In this case,
78  // none of the autofill++ objects below should be present.
79  optional string name = 1;
80  optional string value = 2;
81  repeated int64 usage_timestamp = 3;
82
83  // An autofill++ profile object.  If present, indicates this entity
84  // represents an AutofillProfile exclusively, and no other fields (such as
85  // name/value or credit_card) should be present.
86  optional AutofillProfileSpecifics profile = 4;
87
88  // An AutofillCreditCardSpecifics, encryped using Nigori (see Chromium's
89  // base/nigori.h for details).  If present, indicates this entity represents
90  // an autofill++ CreditCard, and no other fields should be present.
91  // If encryption for autofill++ is not enabled, this is unused.  See
92  // |credit_card| in that case.
93  optional bytes encrypted_credit_card = 5;
94
95  // If encryption for autofill++ is not enabled, this field stores the
96  // AutofillCreditCardSpecifics [instead of |encrypted_credit_card|].
97  optional AutofillCreditCardSpecifics credit_card = 6;
98}
99
100extend EntitySpecifics {
101  optional AutofillSpecifics autofill = 31729;
102  optional AutofillProfileSpecifics autofill_profile = 63951;
103}
104