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

Unified Diff: chrome/browser/autofill/personal_data_manager.h

Issue 6676031: Autofill database migration to clean up bogus profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/autofill/personal_data_manager.h
diff --git a/chrome/browser/autofill/personal_data_manager.h b/chrome/browser/autofill/personal_data_manager.h
index 67780937de500a0269d27f1ea63cc867112a0810..73d1cc13e91c42774a616bccab174611dad849df 100644
--- a/chrome/browser/autofill/personal_data_manager.h
+++ b/chrome/browser/autofill/personal_data_manager.h
@@ -150,6 +150,17 @@ class PersonalDataManager
// Kicks off asynchronous loading of profiles and credit cards.
void Init(Profile* profile);
+ // Checks suitability of |profile| for merging.
+ static bool IsSuitableMergeProfile(const AutofillProfile& profile);
Ilya Sherman 2011/03/16 04:58:57 nit: I don't like that this function name includes
dhollowa 2011/03/16 16:13:35 Done.
+
+ // Merges |profile| into one of the |existing_profiles| if possible; otherwise
+ // appends |profile| to the end of that list. Fills |merged_profiles| with the
+ // result.
+ static bool MergeProfile(
+ const AutofillProfile& profile,
+ const std::vector<AutofillProfile*>& existing_profiles,
+ std::vector<AutofillProfile>* merged_profiles);
+
protected:
// Make sure that only Profile and certain tests can create an instance of
// PersonalDataManager.
@@ -194,12 +205,8 @@ class PersonalDataManager
// Saves |imported_profile| to the WebDB if it exists.
virtual void SaveImportedProfile(const AutofillProfile& imported_profile);
- // Merges |profile| into one of the |existing_profiles| if possible; otherwise
- // appends |profile| to the end of that list. Fills |merged_profiles| with the
- // result.
- bool MergeProfile(const AutofillProfile& profile,
- const std::vector<AutofillProfile*>& existing_profiles,
- std::vector<AutofillProfile>* merged_profiles);
+ // Notifies Sync about data migration if necessary.
+ void EmptyMigrationTrash() const;
// The first time this is called, logs an UMA metrics for the number of
// profiles the user has. On subsequent calls, does nothing.

Powered by Google App Engine
This is Rietveld 408576698