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