Commit 2d754c7e authored by Vincent Boisselle's avatar Vincent Boisselle Committed by Commit Bot

Added new Autofil API v1 protos.

These protos will be used to interface with the new Autofill API. We don't make any use of the protos in this CL.

Change-Id: I2353c0f183501748556cd3702f6fc625c43adb50
Reviewed-on: https://chromium-review.googlesource.com/c/1324197Reviewed-by: default avatarMathieu Perreault <mathp@chromium.org>
Reviewed-by: default avatarRoger McFarlane <rogerm@chromium.org>
Commit-Queue: Vincent Boisselle <vincb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607646}
parent dfa24463
......@@ -6,6 +6,7 @@ import("//third_party/libprotobuf-mutator/fuzzable_proto_library.gni")
fuzzable_proto_library("proto") {
sources = [
"api_v1.proto",
"autofill_sync.proto",
"password_requirements.proto",
"password_requirements_shard.proto",
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Data models to interface with Autofill API v1.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package autofill;
import "password_requirements.proto";
// Request to retrieve field suggestions from Autofill API for forms in a page
// that can be used as a resource ID in a RESTful interface.
message AutofillPageResourceQueryRequest {
// Serialized AutofillPageQueryRequest encoded in base64. We cannot use
// "bytes" because this is not supported by the API. The serialized_request is
// also a distinct signature that can be used for caching.
optional string serialized_request = 1;
};
// Request to retrieve field suggestions for multiple forms in a page. You can
// see this as batched form requests.
// Next ID: 3
message AutofillPageQueryRequest {
// Next ID: 3
message Form {
// Next ID: 4
message Field {
// Signature made of the field |name| and |control_type|.
optional fixed32 signature = 1;
// Name of the field (e.g., "First Name").
optional string name = 2;
// Type of the control (e.g., "email").
optional string control_type = 3;
};
// Signature of the form that is made of:
// - URL scheme (e.g., "http")
// - URL domain page (e.g., "google.com")
// - Form name (e.g., "Sign In")
// - Concatenated field names (e.g., "First Name", "Last Name")
optional fixed64 signature = 1;
// Fields of the form for which we want suggestions.
repeated Field fields = 2;
};
// Version of the client. Do not use, deprecated.
optional string client_version = 1 [deprecated = true];
// Forms in the same page for which we want fields suggestions.
repeated Form forms = 2;
};
// Response containing field suggestions from Autofill API for
// AutofillPageQueryRequest request. Form and fields are in the exact same order
// as in the request that gave the response.
// Next ID: 2
message AutofillQueryResponse {
// Next ID: 2
message FormSuggestion {
// Next ID: 6
message FieldSuggestion {
// Prediction made on a field.
message FieldPrediction {
// The predicted field type.
optional fixed32 type = 1;
}
// Signature identifying the field that is the same as in the request.
optional fixed32 field_signature = 1;
// The predicted field type.
optional int32 primary_type_prediction = 2;
// Detailed list of all possible predictions (including
// |primary_type_prediction| as the first item).
repeated FieldPrediction predictions = 3;
// Whether the server-side classification believes that the field
// may be pre-filled with a placeholder in the value attribute.
optional bool may_use_prefilled_placeholder = 4;
// For fields of type NEW_PASSWORD and ACCOUNT_CREATION_PASSWORD, this may
// specify requirements for the generation of passwords.
optional .autofill.PasswordRequirementsSpec password_requirements = 5;
};
// Suggestions on the fields in the same form.
repeated FieldSuggestion field_suggestions = 1;
};
// Suggestions for forms in the same page.
repeated FormSuggestion form_suggestions = 1;
};
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Data models to interface with legacy Autofill API.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
......@@ -10,8 +12,8 @@ package autofill;
import "password_requirements.proto";
// The message is sent when a client needs to autofill forms on web pages and
// asks the server about known field types.
// Request to query field suggestions for forms in a page from legacy Autofill
// API.
// Next available id: 11
message AutofillQueryContents {
required string client_version = 1;
......@@ -25,8 +27,9 @@ message AutofillQueryContents {
}
}
// This message is the result of an Autofill query. It holds the field type
// information.
// Response from Autofill query on the legacy API that gives field suggestions
// for forms of a page in a flattened representation. The fields are returned in
// the exact same order as filled in the request.
// Next available id: 10
message AutofillQueryResponseContents {
optional bool upload_required = 1 [deprecated = true];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment