Index: components/autofill/core/browser/autofill_profile.h |
diff --git a/components/autofill/core/browser/autofill_profile.h b/components/autofill/core/browser/autofill_profile.h |
index ae7b521385d87030a22ec239efdafaa456170079..413b3dbd5f8e99538f20fb07de594c83057665e7 100644 |
--- a/components/autofill/core/browser/autofill_profile.h |
+++ b/components/autofill/core/browser/autofill_profile.h |
@@ -14,6 +14,7 @@ |
#include "base/compiler_specific.h" |
#include "base/strings/string16.h" |
+#include "base/time/time.h" |
#include "components/autofill/core/browser/address.h" |
#include "components/autofill/core/browser/autofill_data_model.h" |
#include "components/autofill/core/browser/autofill_type.h" |
@@ -174,11 +175,16 @@ class AutofillProfile : public AutofillDataModel { |
// creates its own. The ID is a hash of the data contained in the profile. |
void GenerateServerProfileIdentifier(); |
- // Logs the number of days since the profile was last used and records its |
- // use. |
+ // Logs the number of days since the profile was last used, records its |
+ // use and updates |previous_use_date_| to time it was previously used. |
sebsg
2017/05/08 21:43:29
nit: and updates |previous_use_date_| to the last
csashi
2017/05/08 21:51:41
Done.
|
void RecordAndLogUse(); |
- // Valid only when type() == SERVER_PROFILE. |
+ const base::Time& previous_use_date() const { return previous_use_date_; } |
+ void set_previous_use_date(const base::Time& time) { |
+ previous_use_date_ = time; |
+ } |
+ |
+ // Valid only when |record_type()| == |SERVER_PROFILE|. |
bool has_converted() const { return has_converted_; } |
void set_has_converted(bool has_converted) { has_converted_ = has_converted; } |
@@ -210,8 +216,6 @@ class AutofillProfile : public AutofillDataModel { |
// Same as operator==, but ignores differences in GUID. |
bool EqualsSansGuid(const AutofillProfile& profile) const; |
- RecordType record_type_; |
- |
// Personal information for this profile. |
NameInfo name_; |
EmailInfo email_; |
@@ -226,6 +230,11 @@ class AutofillProfile : public AutofillDataModel { |
// a hash of the contents. |
std::string server_id_; |
+ // Penultimate time model was used. |
+ base::Time previous_use_date_; |
sebsg
2017/05/08 21:43:29
Could you add a comment here, saying that this val
csashi
2017/05/08 21:51:41
Done.
|
+ |
+ RecordType record_type_; |
sebsg
2017/05/08 21:43:29
Is there a particular reason why you moved it down
csashi
2017/05/08 21:51:41
https://bugs.chromium.org/p/chromium/issues/detail
sebsg
2017/05/08 21:54:19
Ah sweet, thank for the info.
|
+ |
// Only useful for SERVER_PROFILEs. Whether this server profile has been |
// converted to a local profile. |
bool has_converted_; |