Index: components/autofill/core/browser/autofill_profile.cc |
diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc |
index 93b155530f28e092b925939028102f906b01b409..58de538a6929bc20aaa9d249b57c621c39d37732 100644 |
--- a/components/autofill/core/browser/autofill_profile.cc |
+++ b/components/autofill/core/browser/autofill_profile.cc |
@@ -464,9 +464,8 @@ bool AutofillProfile::MergeDataFrom(const AutofillProfile& profile, |
set_origin(profile.origin()); |
set_language_code(profile.language_code()); |
- set_use_count(profile.use_count() + use_count()); |
- if (profile.use_date() > use_date()) |
- set_use_date(profile.use_date()); |
+ set_use_count(std::max(profile.use_count(), use_count())); |
Mathieu
2016/07/21 19:16:01
Let's add the rationale for the future reader!
Roger McFarlane (Chromium)
2016/07/22 01:15:25
Done.
|
+ set_use_date(std::max(profile.use_date(), use_date())); |
// Now that the preferred values have been obtained, update the fields which |
// need to be modified, if any. Note: that we're comparing the fields for |