| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 92   static bool IsAutofillFieldMetadataEnabled(); | 92   static bool IsAutofillFieldMetadataEnabled(); | 
| 93 | 93 | 
| 94   // 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, | 
| 95   // 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. | 
| 96   std::string FormSignature() const; | 96   std::string FormSignature() const; | 
| 97 | 97 | 
| 98   // 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 | 
| 99   // auto-fillable, like google/yahoo/msn search, etc. | 99   // auto-fillable, like google/yahoo/msn search, etc. | 
| 100   bool IsAutofillable() const; | 100   bool IsAutofillable() const; | 
| 101 | 101 | 
|  | 102   // Returns whether |this| form represents a complete Credit Card form, which | 
|  | 103   // consists in having at least a credit card number field and an expiration | 
|  | 104   // field. | 
|  | 105   bool IsCompleteCreditCardForm() const; | 
|  | 106 | 
| 102   // Resets |autofill_count_| and counts the number of auto-fillable fields. | 107   // Resets |autofill_count_| and counts the number of auto-fillable fields. | 
| 103   // This is used when we receive server data for form fields.  At that time, | 108   // This is used when we receive server data for form fields.  At that time, | 
| 104   // we may have more known fields than just the number of fields we matched | 109   // we may have more known fields than just the number of fields we matched | 
| 105   // heuristically. | 110   // heuristically. | 
| 106   void UpdateAutofillCount(); | 111   void UpdateAutofillCount(); | 
| 107 | 112 | 
| 108   // Returns true if this form matches the structural requirements for Autofill. | 113   // Returns true if this form matches the structural requirements for Autofill. | 
| 109   bool ShouldBeParsed() const; | 114   bool ShouldBeParsed() const; | 
| 110 | 115 | 
| 111   // Returns true if we should query the crowdsourcing server to determine this | 116   // Returns true if we should query the crowdsourcing server to determine this | 
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 318 | 323 | 
| 319   // True if all form fields are password fields. | 324   // True if all form fields are password fields. | 
| 320   bool all_fields_are_passwords_; | 325   bool all_fields_are_passwords_; | 
| 321 | 326 | 
| 322   DISALLOW_COPY_AND_ASSIGN(FormStructure); | 327   DISALLOW_COPY_AND_ASSIGN(FormStructure); | 
| 323 }; | 328 }; | 
| 324 | 329 | 
| 325 }  // namespace autofill | 330 }  // namespace autofill | 
| 326 | 331 | 
| 327 #endif  // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ | 332 #endif  // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ | 
| OLD | NEW | 
|---|