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

Side by Side Diff: components/autofill/browser/autofill_profile.h

Issue 13697002: Make autofill's Address store country using the country code so that app locale isn't needed for th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix remaining tests 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_PROFILE_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_PROFILE_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_PROFILE_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_PROFILE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // profiles. Shows at least 2 fields that differentiate profile from other 75 // profiles. Shows at least 2 fields that differentiate profile from other
76 // profiles. See AdjustInferredLabels() further down for more description. 76 // profiles. See AdjustInferredLabels() further down for more description.
77 const string16 Label() const; 77 const string16 Label() const;
78 78
79 // This guid is the primary identifier for |AutofillProfile| objects. 79 // This guid is the primary identifier for |AutofillProfile| objects.
80 // TODO(estade): remove this and just use GetGUID(). |guid_| can probably 80 // TODO(estade): remove this and just use GetGUID(). |guid_| can probably
81 // be moved to FormGroup. 81 // be moved to FormGroup.
82 const std::string guid() const { return guid_; } 82 const std::string guid() const { return guid_; }
83 void set_guid(const std::string& guid) { guid_ = guid; } 83 void set_guid(const std::string& guid) { guid_ = guid; }
84 84
85 // Accessors for the stored address's country code.
86 const std::string CountryCode() const;
87 void SetCountryCode(const std::string& country_code);
88
89 // Returns true if there are no values (field types) set. 85 // Returns true if there are no values (field types) set.
90 bool IsEmpty() const; 86 bool IsEmpty() const;
91 87
92 // Comparison for Sync. Returns 0 if the profile is the same as |this|, 88 // Comparison for Sync. Returns 0 if the profile is the same as |this|,
93 // or < 0, or > 0 if it is different. The implied ordering can be used for 89 // or < 0, or > 0 if it is different. The implied ordering can be used for
94 // culling duplicates. The ordering is based on collation order of the 90 // culling duplicates. The ordering is based on collation order of the
95 // textual contents of the fields. 91 // textual contents of the fields.
96 // GUIDs are not compared, only the values of the contents themselves. 92 // GUIDs are not compared, only the values of the contents themselves.
97 // Full profile comparision, comparison includes multi-valued fields. 93 // Full profile comparision, comparison includes multi-valued fields.
98 int Compare(const AutofillProfile& profile) const; 94 int Compare(const AutofillProfile& profile) const;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 std::vector<EmailInfo> email_; 198 std::vector<EmailInfo> email_;
203 CompanyInfo company_; 199 CompanyInfo company_;
204 std::vector<PhoneNumber> home_number_; 200 std::vector<PhoneNumber> home_number_;
205 Address address_; 201 Address address_;
206 }; 202 };
207 203
208 // So we can compare AutofillProfiles with EXPECT_EQ(). 204 // So we can compare AutofillProfiles with EXPECT_EQ().
209 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); 205 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile);
210 206
211 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_PROFILE_H_ 207 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_PROFILE_H_
OLDNEW
« no previous file with comments | « components/autofill/browser/autocheckout_manager.cc ('k') | components/autofill/browser/autofill_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698