| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 
| 6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| 11 #include "base/scoped_vector.h" | 11 #include "base/scoped_vector.h" | 
| 12 #include "chrome/browser/autofill/autofill_field.h" | 12 #include "chrome/browser/autofill/autofill_field.h" | 
| 13 #include "chrome/browser/autofill/autofill_type.h" | 13 #include "chrome/browser/autofill/autofill_type.h" | 
| 14 #include "chrome/browser/autofill/field_types.h" | 14 #include "chrome/browser/autofill/field_types.h" | 
| 15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" | 
| 16 | 16 | 
|  | 17 struct FormData; | 
|  | 18 | 
| 17 namespace webkit_glue { | 19 namespace webkit_glue { | 
| 18 class FormFieldValues; | 20 class FormFieldValues; | 
| 19 } | 21 } | 
| 20 | 22 | 
| 21 enum RequestMethod { | 23 enum RequestMethod { | 
| 22   GET, | 24   GET, | 
| 23   POST | 25   POST | 
| 24 }; | 26 }; | 
| 25 | 27 | 
| 26 // FormStructure stores a single HTML form together with the values entered | 28 // FormStructure stores a single HTML form together with the values entered | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 51   size_t field_count() const; | 53   size_t field_count() const; | 
| 52 | 54 | 
| 53   // Used for iterating over the fields. | 55   // Used for iterating over the fields. | 
| 54   std::vector<AutoFillField*>::const_iterator begin() const { | 56   std::vector<AutoFillField*>::const_iterator begin() const { | 
| 55     return fields_.begin(); | 57     return fields_.begin(); | 
| 56   } | 58   } | 
| 57   std::vector<AutoFillField*>::const_iterator end() const { | 59   std::vector<AutoFillField*>::const_iterator end() const { | 
| 58     return fields_.end(); | 60     return fields_.end(); | 
| 59   } | 61   } | 
| 60 | 62 | 
|  | 63   bool operator!=(const FormData& form) const; | 
|  | 64 | 
| 61  private: | 65  private: | 
| 62   // Associates the field with the heuristic type for each of the field views. | 66   // Associates the field with the heuristic type for each of the field views. | 
| 63   void GetHeuristicFieldInfo(FieldTypeMap* field_types_map); | 67   void GetHeuristicFieldInfo(FieldTypeMap* field_types_map); | 
| 64 | 68 | 
| 65   // The name of the form. | 69   // The name of the form. | 
|  | 70   // TODO(jhawkins): string16 | 
| 66   std::string form_name_; | 71   std::string form_name_; | 
| 67 | 72 | 
| 68   // The source URL. | 73   // The source URL. | 
| 69   GURL source_url_; | 74   GURL source_url_; | 
| 70 | 75 | 
| 71   // The target URL. | 76   // The target URL. | 
| 72   GURL target_url_; | 77   GURL target_url_; | 
| 73 | 78 | 
| 74   bool has_credit_card_field_; | 79   bool has_credit_card_field_; | 
| 75   bool has_autofillable_field_; | 80   bool has_autofillable_field_; | 
| 76   bool has_password_fields_; | 81   bool has_password_fields_; | 
| 77 | 82 | 
| 78   // A vector of all the input fields in the form.  The vector is terminated by | 83   // A vector of all the input fields in the form.  The vector is terminated by | 
| 79   // a NULL entry. | 84   // a NULL entry. | 
| 80   ScopedVector<AutoFillField> fields_; | 85   ScopedVector<AutoFillField> fields_; | 
| 81 | 86 | 
| 82   // The names of the form input elements, that are part of the form signature. | 87   // The names of the form input elements, that are part of the form signature. | 
| 83   // The string starts with "&" and the names are also separated by the "&" | 88   // The string starts with "&" and the names are also separated by the "&" | 
| 84   // character. E.g.: "&form_input1_name&form_input2_name&...&form_inputN_name" | 89   // character. E.g.: "&form_input1_name&form_input2_name&...&form_inputN_name" | 
| 85   std::string form_signature_field_names_; | 90   std::string form_signature_field_names_; | 
| 86 | 91 | 
| 87   // GET or POST. | 92   // GET or POST. | 
| 88   RequestMethod method_; | 93   RequestMethod method_; | 
| 89 }; | 94 }; | 
| 90 | 95 | 
| 91 #endif  // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 96 #endif  // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 
| OLD | NEW | 
|---|