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

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

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_manager.cc ('k') | components/autofill/browser/autofill_profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/autofill_profile.h
diff --git a/components/autofill/browser/autofill_profile.h b/components/autofill/browser/autofill_profile.h
index a3127b8da3377a644a2050ca9578764b636f89bc..09b5af2e291dcc4e137e666051f0e8872a164c7f 100644
--- a/components/autofill/browser/autofill_profile.h
+++ b/components/autofill/browser/autofill_profile.h
@@ -12,12 +12,13 @@
#include <string>
#include <vector>
+#include "base/compiler_specific.h"
#include "base/string16.h"
#include "components/autofill/browser/address.h"
+#include "components/autofill/browser/autofill_data_model.h"
#include "components/autofill/browser/autofill_type.h"
#include "components/autofill/browser/contact_info.h"
#include "components/autofill/browser/field_types.h"
-#include "components/autofill/browser/form_group.h"
#include "components/autofill/browser/phone_number.h"
namespace autofill {
@@ -28,7 +29,7 @@ struct FormFieldData;
// implements the FormGroup interface so that owners of this object can request
// form information from the profile, and the profile will delegate the request
// to the requested form group type.
-class AutofillProfile : public FormGroup {
+class AutofillProfile : public AutofillDataModel {
public:
explicit AutofillProfile(const std::string& guid);
@@ -40,7 +41,6 @@ class AutofillProfile : public FormGroup {
AutofillProfile& operator=(const AutofillProfile& profile);
// FormGroup:
- virtual std::string GetGUID() const OVERRIDE;
virtual void GetMatchingTypes(const base::string16& text,
const std::string& app_locale,
FieldTypeSet* matching_types) const OVERRIDE;
@@ -52,6 +52,8 @@ class AutofillProfile : public FormGroup {
virtual bool SetInfo(AutofillFieldType type,
const base::string16& value,
const std::string& app_locale) OVERRIDE;
+
+ // AutofillDataModel:
virtual void FillFormField(const AutofillField& field,
size_t variant,
const std::string& app_locale,
@@ -80,12 +82,6 @@ class AutofillProfile : public FormGroup {
// profiles. See AdjustInferredLabels() further down for more description.
const base::string16 Label() const;
- // This guid is the primary identifier for |AutofillProfile| objects.
- // TODO(estade): remove this and just use GetGUID(). |guid_| can probably
- // be moved to FormGroup.
- const std::string guid() const { return guid_; }
- void set_guid(const std::string& guid) { guid_ = guid; }
-
// Returns true if there are no values (field types) set.
bool IsEmpty(const std::string& app_locale) const;
@@ -198,9 +194,6 @@ class AutofillProfile : public FormGroup {
// The label presented to the user when selecting a profile.
base::string16 label_;
- // The guid of this profile.
- std::string guid_;
-
// Personal information for this profile.
std::vector<NameInfo> name_;
std::vector<EmailInfo> email_;
« no previous file with comments | « components/autofill/browser/autofill_manager.cc ('k') | components/autofill/browser/autofill_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698