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

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: Move to Lingesh's observer mechanism. 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
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..e5ca857b75fa21236720dd4381ed2487f381ce9e 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,16 @@ 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 guid is in the trash.
+ bool IsAutofillGUIDInTrash(const std::string& guid);
+
+ // Clear all profiles.
+ bool ClearAutofillProfiles();
+
bool InitKeywordsTable();
bool InitLoginsTable();
bool InitAutofillTable();
@@ -341,6 +360,7 @@ class WebDatabase {
bool InitAutofillProfileNamesTable();
bool InitAutofillProfileEmailsTable();
bool InitAutofillProfilePhonesTable();
+ bool InitAutofillProfileTrashTable();
bool InitCreditCardsTable();
bool InitTokenServiceTable();
bool InitWebAppIconsTable();

Powered by Google App Engine
This is Rietveld 408576698