Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: components/autofill/core/common/autofill_constants.h

Issue 1670763006: Autofill server-side heuristics for 2 fields password form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Contains constants specific to the Autofill component. 5 // Contains constants specific to the Autofill component.
6 6
7 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ 7 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_
8 #define COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ 8 #define COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_
9 9
10 #include <stddef.h> // For size_t 10 #include <stddef.h> // For size_t
11 11
12 namespace autofill { 12 namespace autofill {
13 13
14 // Help URL for the Autofill dialog. 14 // Help URL for the Autofill dialog.
15 extern const char kHelpURL[]; 15 extern const char kHelpURL[];
16 16
17 // The number of fields required by Autofill to execute its heuristic and 17 // The number of fields required by Autofill to execute its heuristic and
18 // crowdsourcing prediction routines. Ideally we would execute those routines no 18 // crowdsourcing prediction routines. Ideally we would execute those routines no
19 // matter how many fields are in the forms; however, finding the label for each 19 // matter how many fields are in the forms; however, finding the label for each
20 // field is a costly operation and we can't spare the cycles if it's not 20 // field is a costly operation and we can't spare the cycles if it's not
21 // necessary. 21 // necessary.
22 const size_t kRequiredFieldsForPredictionRoutines = 3; 22 const size_t kRequiredFieldsForPredictionRoutines = 3;
23 23
24 // The minimum number of fields required to upload a form to the Autofill 24 // The minimum number of fields required to upload a form to the Autofill
25 // servers. 25 // servers.
26 const size_t kRequiredFieldsForUpload = 3; 26 const size_t kRequiredFieldsForUpload = 3;
27 27
28 // The minimum number of fields in a form that contains only password fields to
29 // upload the form to and request predictions from the Autofill servers.
30 const size_t kRequiredFieldsForFormsWithOnlyPasswordFields = 2;
31
28 // Options bitmask values for AutofillHostMsg_ShowPasswordSuggestions IPC 32 // Options bitmask values for AutofillHostMsg_ShowPasswordSuggestions IPC
29 enum ShowPasswordSuggestionsOptions { 33 enum ShowPasswordSuggestionsOptions {
30 SHOW_ALL = 1 << 0 /* show all credentials, not just ones matching username */, 34 SHOW_ALL = 1 << 0 /* show all credentials, not just ones matching username */,
31 IS_PASSWORD_FIELD = 1 << 1 /* input field is a password field */ 35 IS_PASSWORD_FIELD = 1 << 1 /* input field is a password field */
32 }; 36 };
33 37
34 } // namespace autofill 38 } // namespace autofill
35 39
36 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ 40 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698