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_AUTOFILL_DATA_MODEL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_MODEL_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_MODEL_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/autofill/core/browser/field_types.h" | 10 #include "components/autofill/core/browser/field_types.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 // Set |field_data|'s value based on |field| and contents of |this| (using | 26 // Set |field_data|'s value based on |field| and contents of |this| (using |
27 // data variant |variant|). | 27 // data variant |variant|). |
28 virtual void FillFormField(const AutofillField& field, | 28 virtual void FillFormField(const AutofillField& field, |
29 size_t variant, | 29 size_t variant, |
30 const std::string& app_locale, | 30 const std::string& app_locale, |
31 FormFieldData* field_data) const = 0; | 31 FormFieldData* field_data) const = 0; |
32 | 32 |
33 // Fills in select control with data matching |type| from |this|. | 33 // Fills in select control with data matching |type| from |this|. |
34 // Public for testing purposes. | 34 // Public for testing purposes. |
35 void FillSelectControl(AutofillFieldType type, | 35 void FillSelectControl(const AutofillType& type, |
36 const std::string& app_locale, | 36 const std::string& app_locale, |
37 FormFieldData* field_data) const; | 37 FormFieldData* field_data) const; |
38 | 38 |
39 // Returns true if the data in this model was entered directly by the user, | 39 // Returns true if the data in this model was entered directly by the user, |
40 // rather than automatically aggregated. | 40 // rather than automatically aggregated. |
41 bool IsVerified() const; | 41 bool IsVerified() const; |
42 | 42 |
43 std::string guid() const { return guid_; } | 43 std::string guid() const { return guid_; } |
44 void set_guid(const std::string& guid) { guid_ = guid; } | 44 void set_guid(const std::string& guid) { guid_ = guid; } |
45 | 45 |
(...skipping 15 matching lines...) Expand all Loading... |
61 // automatically aggregated, e.g. https://www.example.com/register, | 61 // automatically aggregated, e.g. https://www.example.com/register, |
62 // (b) some other non-empty string, which cannot be interpreted as a web | 62 // (b) some other non-empty string, which cannot be interpreted as a web |
63 // URL, identifying the origin for non-aggregated data, or | 63 // URL, identifying the origin for non-aggregated data, or |
64 // (c) an empty string, indicating that the origin for this data is unknown. | 64 // (c) an empty string, indicating that the origin for this data is unknown. |
65 std::string origin_; | 65 std::string origin_; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace autofill | 68 } // namespace autofill |
69 | 69 |
70 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_MODEL_H_ | 70 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_MODEL_H_ |
OLD | NEW |