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

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

Issue 1952002: AutoFill profile shouldn't be saved when cancelled during initial setup. (Closed)
Patch Set: Created 10 years, 8 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/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a5903a91b86cc562cbf909d9e3f4868b3c51d42d..9b5ac129795aaa8de8690bb1da548029c6fbffbe 100644
--- a/chrome/browser/autofill/personal_data_manager.h
+++ b/chrome/browser/autofill/personal_data_manager.h
@@ -50,10 +50,10 @@ class PersonalDataManager : public WebDataServiceConsumer,
std::vector<CreditCard>* credit_cards);
// Sets the listener to be notified of PersonalDataManager events.
- void SetObserver(PersonalDataManager::Observer* observer);
+ virtual void SetObserver(PersonalDataManager::Observer* observer);
// Removes |observer| as the observer of this PersonalDataManager.
- void RemoveObserver(PersonalDataManager::Observer* observer);
+ virtual void RemoveObserver(PersonalDataManager::Observer* observer);
// If AutoFill is able to determine the field types of a significant number
// of field types that contain information in the FormStructures and the user
@@ -67,6 +67,14 @@ class PersonalDataManager : public WebDataServiceConsumer,
// exist.
void SaveImportedFormData();
+ // Gets |imported_profile_| and |imported_credit_card_| and returns their
+ // values in |profile| and |credit_card| parameters respectively. One or
+ // both may return NULL. The objects returned are owned by the
+ // PersonalDataManager, so should be considered weak references by caller.
+ // TODO(dhollowa) Now that we aren't immediately saving the imported form
+ // data, we should store the profile and CC in the AFM instead of the PDM.
+ void GetImportedFormData(AutoFillProfile** profile, CreditCard** credit_card);
+
// Sets |web_profiles_| to the contents of |profiles| and updates the web
// database by adding, updating and removing profiles. Sets the unique ID of
// newly-added profiles.
@@ -102,8 +110,10 @@ class PersonalDataManager : public WebDataServiceConsumer,
// card information, respectively. |profiles()| returns both web and
// auxiliary profiles. |web_profiles()| returns only web profiles.
const std::vector<AutoFillProfile*>& profiles();
- const std::vector<AutoFillProfile*>& web_profiles();
- const std::vector<CreditCard*>& credit_cards() { return credit_cards_.get(); }
+ virtual const std::vector<AutoFillProfile*>& web_profiles();
+ virtual const std::vector<CreditCard*>& credit_cards() {
+ return credit_cards_.get();
+ }
// Returns the index of the default profile within the vector returned by
// |web_profiles()|, or -1 if there are no profiles.
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698