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

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

Issue 6676031: Autofill database migration to clean up bogus profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds fix for upload. Created 9 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/web_data_service.cc ('k') | chrome/browser/webdata/web_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/web_database.h
diff --git a/chrome/browser/webdata/web_database.h b/chrome/browser/webdata/web_database.h
index 2b647a8bde2a2d3bc1104e4ac02c10fa20dbf3d9..01274cc44758927819438af0eca3082d42abd60c 100644
--- a/chrome/browser/webdata/web_database.h
+++ b/chrome/browser/webdata/web_database.h
@@ -261,6 +261,13 @@ class WebDatabase {
base::Time delete_begin,
base::Time delete_end);
+ // Retrieves all profiles in the database that have been deleted since last
+ // "empty" of the trash.
+ bool GetAutofillProfilesInTrash(std::vector<std::string>* guids);
+
+ // Empties the Autofill profiles "trash can".
+ bool EmptyAutofillProfilesTrash();
+
//////////////////////////////////////////////////////////////////////////////
//
// Web Apps
@@ -311,6 +318,8 @@ class WebDatabase {
FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, CreditCard);
FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, UpdateAutofillProfile);
FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, UpdateCreditCard);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, AutofillProfileTrash);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, AutofillProfileTrashInteraction);
FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest,
RemoveAutofillProfilesAndCreditCardsModifiedBetween);
@@ -333,6 +342,19 @@ class WebDatabase {
// Insert a single AutofillEntry into the autofill/autofill_dates tables.
bool InsertAutofillEntry(const AutofillEntry& entry);
+ // Retrieves all profiles in the database that have been deleted since last
+ // "empty" of the trash.
+ bool AddAutofillGUIDToTrash(const std::string& guid);
+
+ // Checks if the trash is empty.
+ bool IsAutofillProfilesTrashEmpty();
+
+ // Checks if the guid is in the trash.
+ bool IsAutofillGUIDInTrash(const std::string& guid);
+
+ // Clear all profiles.
+ bool ClearAutofillProfiles();
+
bool InitKeywordsTable();
bool InitLoginsTable();
bool InitAutofillTable();
@@ -341,6 +363,7 @@ class WebDatabase {
bool InitAutofillProfileNamesTable();
bool InitAutofillProfileEmailsTable();
bool InitAutofillProfilePhonesTable();
+ bool InitAutofillProfileTrashTable();
bool InitCreditCardsTable();
bool InitTokenServiceTable();
bool InitWebAppIconsTable();
« no previous file with comments | « chrome/browser/webdata/web_data_service.cc ('k') | chrome/browser/webdata/web_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698