Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2301)

Unified Diff: components/autofill/core/browser/webdata/autofill_table.cc

Issue 2008253003: Explicitly set modification_date when loading server entries from db. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments to implementation file Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/autofill/core/browser/webdata/autofill_table_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/webdata/autofill_table.cc
diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc
index fc234ae4107e4224ad0d880ebb76685d5b64a786..b9bfc4bf34ac0ccb3823876b04ca5886b6348504 100644
--- a/components/autofill/core/browser/webdata/autofill_table.cc
+++ b/components/autofill/core/browser/webdata/autofill_table.cc
@@ -953,6 +953,9 @@ bool AutofillTable::GetServerProfiles(std::vector<AutofillProfile*>* profiles) {
AutofillProfile::SERVER_PROFILE, s.ColumnString(index++)));
profile->set_use_count(s.ColumnInt64(index++));
profile->set_use_date(Time::FromInternalValue(s.ColumnInt64(index++)));
+ // Modification date is not tracked for server profiles. Explicitly set it
+ // here to override the default value of Time::Now().
+ profile->set_modification_date(Time());
base::string16 recipient_name = s.ColumnString16(index++);
profile->SetRawInfo(COMPANY_NAME, s.ColumnString16(index++));
@@ -1219,6 +1222,9 @@ bool AutofillTable::GetServerCreditCards(
: full_card_number);
card->set_use_count(s.ColumnInt64(index++));
card->set_use_date(Time::FromInternalValue(s.ColumnInt64(index++)));
+ // Modification date is not tracked for server cards. Explicitly set it here
+ // to override the default value of Time::Now().
+ card->set_modification_date(Time());
std::string card_type = s.ColumnString(index++);
if (record_type == CreditCard::MASKED_SERVER_CARD) {
« no previous file with comments | « no previous file | components/autofill/core/browser/webdata/autofill_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698