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

Unified Diff: chrome/browser/webdata/autofill_table.h

Issue 9959086: Add probability of culling if sync is enabled to https://chromiumcodereview.appspot.com/9585020/ In… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comment Created 8 years, 9 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 | « chrome/browser/webdata/autofill_entry_unittest.cc ('k') | chrome/browser/webdata/autofill_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/autofill_table.h
diff --git a/chrome/browser/webdata/autofill_table.h b/chrome/browser/webdata/autofill_table.h
index 4430f17cba4472d8c404c74898a51a207ed339ff..2e821a82298b85106b7cf7b56d58a57655214de4 100644
--- a/chrome/browser/webdata/autofill_table.h
+++ b/chrome/browser/webdata/autofill_table.h
@@ -154,17 +154,26 @@ class AutofillTable : public WebDatabaseTable {
const base::Time& delete_end,
std::vector<AutofillChange>* changes);
+ // Removes rows from autofill_dates if they were accessed strictly before
+ // |AutofillEntry::ExpirationTime()|. Removes the corresponding row from the
+ // autofill table. Also culls timestamps to only two. TODO(georgey): remove
+ // culling in future versions.
+ bool RemoveExpiredFormElements(std::vector<AutofillChange>* changes);
+
// Removes from autofill_dates rows with given pair_id where date_created lies
- // between delte_begin and delte_end.
+ // between |delete_begin| and |delete_end|.
bool RemoveFormElementForTimeRange(int64 pair_id,
const base::Time& delete_begin,
const base::Time& delete_end,
int* how_many);
- // Increments the count in the row corresponding to |pair_id| by
- // |delta|. Removes the row from the table and sets the
- // |was_removed| out parameter to true if the count becomes 0.
- bool AddToCountOfFormElement(int64 pair_id, int delta, bool* was_removed);
+ // Increments the count in the row corresponding to |pair_id| by |delta|.
+ bool AddToCountOfFormElement(int64 pair_id, int delta);
+
+ // Counts how many timestamp data rows are in the |autofill_dates| table for
+ // a given |pair_id|. GetCountOfFormElement() on the other hand gives the
+ // |count| property for a given id.
+ int CountTimestampsData(int64 pair_id);
// Gets the pair_id and count entries from name and value specified in
// |element|. Sets *pair_id and *count to 0 if there is no such row in
@@ -187,6 +196,9 @@ class AutofillTable : public WebDatabaseTable {
// Adds a new row to the autofill_dates table.
bool InsertPairIDAndDate(int64 pair_id, const base::Time& date_created);
+ // Deletes last access to the Autofill data from the autofill_dates table.
+ bool DeleteLastAccess(int64 pair_id);
+
// Removes row from the autofill tables given |pair_id|.
bool RemoveFormElementForID(int64 pair_id);
« no previous file with comments | « chrome/browser/webdata/autofill_entry_unittest.cc ('k') | chrome/browser/webdata/autofill_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698