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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "components/autofill/core/browser/form_group.h" | 14 #include "components/autofill/core/browser/form_group.h" |
15 | 15 |
16 namespace autofill { | 16 namespace autofill { |
17 | 17 |
18 class AutofillType; | |
19 | |
20 // This class is an interface for the primary data models that back Autofill. | 18 // This class is an interface for the primary data models that back Autofill. |
21 // The information in objects of this class is managed by the | 19 // The information in objects of this class is managed by the |
22 // PersonalDataManager. | 20 // PersonalDataManager. |
23 class AutofillDataModel : public FormGroup { | 21 class AutofillDataModel : public FormGroup { |
24 public: | 22 public: |
25 AutofillDataModel(const std::string& guid, const std::string& origin); | 23 AutofillDataModel(const std::string& guid, const std::string& origin); |
26 ~AutofillDataModel() override; | 24 ~AutofillDataModel() override; |
27 | 25 |
28 // Returns true if the data in this model was entered directly by the user, | 26 // Returns true if the data in this model was entered directly by the user, |
29 // rather than automatically aggregated. | 27 // rather than automatically aggregated. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Returns a score based on both the recency (relative to |time|) and | 81 // Returns a score based on both the recency (relative to |time|) and |
84 // frequency for the model. The score is a negative number where a higher | 82 // frequency for the model. The score is a negative number where a higher |
85 // value is more relevant. |time| is passed as a parameter to ensure | 83 // value is more relevant. |time| is passed as a parameter to ensure |
86 // consistent results. | 84 // consistent results. |
87 double GetFrecencyScore(base::Time time) const; | 85 double GetFrecencyScore(base::Time time) const; |
88 }; | 86 }; |
89 | 87 |
90 } // namespace autofill | 88 } // namespace autofill |
91 | 89 |
92 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_MODEL_H_ | 90 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_MODEL_H_ |
OLD | NEW |