Commit 3f86ebce authored by sebsg's avatar sebsg Committed by Commit Bot

[AF] Clear profile pieces when deleting data in time range.

Previously is only deleted form the main profile table. The sub tables
need to be deleted too.

Bug: 836737
Change-Id: I1e5fc74ace5b073cc66fcece422c2fd50d208743
Reviewed-on: https://chromium-review.googlesource.com/1031311Reviewed-by: default avatarRoger McFarlane <rogerm@chromium.org>
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554410}
parent a01706c3
...@@ -1578,6 +1578,12 @@ bool AutofillTable::RemoveAutofillDataModifiedBetween( ...@@ -1578,6 +1578,12 @@ bool AutofillTable::RemoveAutofillDataModifiedBetween(
if (!s_profiles_get.Succeeded()) if (!s_profiles_get.Succeeded())
return false; return false;
// Remove the profile pieces.
for (const std::string& guid : *profile_guids) {
if (!RemoveAutofillProfilePieces(guid, db_))
return false;
}
// Remove Autofill profiles in the time range. // Remove Autofill profiles in the time range.
sql::Statement s_profiles(db_->GetUniqueStatement( sql::Statement s_profiles(db_->GetUniqueStatement(
"DELETE FROM autofill_profiles " "DELETE FROM autofill_profiles "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment