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

Unified Diff: components/autofill/core/browser/personal_data_manager.h

Issue 23882013: [rAc] Persist selection of newly added cards and addresses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests, add a test Created 7 years, 3 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: components/autofill/core/browser/personal_data_manager.h
diff --git a/components/autofill/core/browser/personal_data_manager.h b/components/autofill/core/browser/personal_data_manager.h
index 9b71aa55c58bac43035b41fdf9e0511e27a86c2b..d5dc85ea81b7b6fb9d470e9774e7be54e1c78de4 100644
--- a/components/autofill/core/browser/personal_data_manager.h
+++ b/components/autofill/core/browser/personal_data_manager.h
@@ -79,11 +79,15 @@ class PersonalDataManager : public WebDataServiceConsumer,
bool ImportFormData(const FormStructure& form,
const CreditCard** credit_card);
- // Saves |imported_profile| to the WebDB if it exists.
- virtual void SaveImportedProfile(const AutofillProfile& imported_profile);
+ // Saves |imported_profile| to the WebDB if it exists. Returns the guid of
+ // the new or updated profile, or the empty string if no profile was saved.
+ virtual std::string SaveImportedProfile(
+ const AutofillProfile& imported_profile);
- // Saves a credit card value detected in |ImportedFormData|.
- virtual void SaveImportedCreditCard(const CreditCard& imported_credit_card);
+ // Saves a credit card value detected in |ImportedFormData|. Returns the guid
+ // of the new or updated card, or the empty string if no card was saved.
+ virtual std::string SaveImportedCreditCard(
+ const CreditCard& imported_credit_card);
// Adds |profile| to the web database.
void AddProfile(const AutofillProfile& profile);
@@ -169,8 +173,9 @@ class PersonalDataManager : public WebDataServiceConsumer,
// Merges |new_profile| into one of the |existing_profiles| if possible;
// otherwise appends |new_profile| to the end of that list. Fills
- // |merged_profiles| with the result.
- static bool MergeProfile(
+ // |merged_profiles| with the result. Returns the |guid| of the new or updated
+ // profile.
+ static std::string MergeProfile(
const AutofillProfile& new_profile,
const std::vector<AutofillProfile*>& existing_profiles,
const std::string& app_locale,

Powered by Google App Engine
This is Rietveld 408576698