OLD | NEW |
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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // |rappor_service| may be null. | 81 // |rappor_service| may be null. |
82 static void ParseQueryResponse(std::string response, | 82 static void ParseQueryResponse(std::string response, |
83 const std::vector<FormStructure*>& forms, | 83 const std::vector<FormStructure*>& forms, |
84 rappor::RapporService* rappor_service); | 84 rappor::RapporService* rappor_service); |
85 | 85 |
86 // Returns predictions using the details from the given |form_structures| and | 86 // Returns predictions using the details from the given |form_structures| and |
87 // their fields' predicted types. | 87 // their fields' predicted types. |
88 static std::vector<FormDataPredictions> GetFieldTypePredictions( | 88 static std::vector<FormDataPredictions> GetFieldTypePredictions( |
89 const std::vector<FormStructure*>& form_structures); | 89 const std::vector<FormStructure*>& form_structures); |
90 | 90 |
| 91 // Returns whether sending autofill field metadata to the server is enabled. |
| 92 static bool IsAutofillFieldMetadataEnabled(); |
| 93 |
91 // The unique signature for this form, composed of the target url domain, | 94 // The unique signature for this form, composed of the target url domain, |
92 // the form name, and the form field names in a 64-bit hash. | 95 // the form name, and the form field names in a 64-bit hash. |
93 std::string FormSignature() const; | 96 std::string FormSignature() const; |
94 | 97 |
95 // Runs a quick heuristic to rule out forms that are obviously not | 98 // Runs a quick heuristic to rule out forms that are obviously not |
96 // auto-fillable, like google/yahoo/msn search, etc. | 99 // auto-fillable, like google/yahoo/msn search, etc. |
97 bool IsAutofillable() const; | 100 bool IsAutofillable() const; |
98 | 101 |
99 // Resets |autofill_count_| and counts the number of auto-fillable fields. | 102 // Resets |autofill_count_| and counts the number of auto-fillable fields. |
100 // This is used when we receive server data for form fields. At that time, | 103 // This is used when we receive server data for form fields. At that time, |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 318 |
316 // True if all form fields are password fields. | 319 // True if all form fields are password fields. |
317 bool all_fields_are_passwords_; | 320 bool all_fields_are_passwords_; |
318 | 321 |
319 DISALLOW_COPY_AND_ASSIGN(FormStructure); | 322 DISALLOW_COPY_AND_ASSIGN(FormStructure); |
320 }; | 323 }; |
321 | 324 |
322 } // namespace autofill | 325 } // namespace autofill |
323 | 326 |
324 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ | 327 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ |
OLD | NEW |