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

Unified Diff: components/autofill/browser/autofill_profile.cc

Issue 14096009: [Autofill] Split off AutofillDataModel as a subclass of FormData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android compile Created 7 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 | « components/autofill/browser/autofill_profile.h ('k') | components/autofill/browser/contact_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/autofill_profile.cc
diff --git a/components/autofill/browser/autofill_profile.cc b/components/autofill/browser/autofill_profile.cc
index 9b76b4b60589a5f7f4d738d1722a1f9eceac1c2e..7b3f9ff2544da6f11a418600481984723bc6fd8a 100644
--- a/components/autofill/browser/autofill_profile.cc
+++ b/components/autofill/browser/autofill_profile.cc
@@ -223,21 +223,21 @@ struct CaseInsensitiveStringEquals
} // namespace
AutofillProfile::AutofillProfile(const std::string& guid)
- : guid_(guid),
+ : AutofillDataModel(guid),
name_(1),
email_(1),
home_number_(1, PhoneNumber(this)) {
}
AutofillProfile::AutofillProfile()
- : guid_(base::GenerateGUID()),
+ : AutofillDataModel(base::GenerateGUID()),
name_(1),
email_(1),
home_number_(1, PhoneNumber(this)) {
}
AutofillProfile::AutofillProfile(const AutofillProfile& profile)
- : FormGroup() {
+ : AutofillDataModel(std::string()) {
operator=(profile);
}
@@ -248,9 +248,9 @@ AutofillProfile& AutofillProfile::operator=(const AutofillProfile& profile) {
if (this == &profile)
return *this;
- label_ = profile.label_;
- guid_ = profile.guid_;
+ set_guid(profile.guid());
+ label_ = profile.label_;
name_ = profile.name_;
email_ = profile.email_;
company_ = profile.company_;
@@ -264,10 +264,6 @@ AutofillProfile& AutofillProfile::operator=(const AutofillProfile& profile) {
return *this;
}
-std::string AutofillProfile::GetGUID() const {
- return guid();
-}
-
void AutofillProfile::GetMatchingTypes(const base::string16& text,
const std::string& app_locale,
FieldTypeSet* matching_types) const {
@@ -458,7 +454,7 @@ int AutofillProfile::Compare(const AutofillProfile& profile) const {
}
bool AutofillProfile::operator==(const AutofillProfile& profile) const {
- return guid_ == profile.guid_ && Compare(profile) == 0;
+ return guid() == profile.guid() && Compare(profile) == 0;
}
bool AutofillProfile::operator!=(const AutofillProfile& profile) const {
« no previous file with comments | « components/autofill/browser/autofill_profile.h ('k') | components/autofill/browser/contact_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698