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

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

Issue 2626263005: [Autofill] Sync new wallet metadata fields through Chrome Sync. (Closed)
Patch Set: Addressed comments Created 3 years, 11 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
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CORE_BROWSER_AUTOFILL_PROFILE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 // Creates an identifier and saves it as |server_id_|. Only used for 172 // Creates an identifier and saves it as |server_id_|. Only used for
173 // server credit cards. The server doesn't attach an identifier so Chrome 173 // server credit cards. The server doesn't attach an identifier so Chrome
174 // creates its own. The ID is a hash of the data contained in the profile. 174 // creates its own. The ID is a hash of the data contained in the profile.
175 void GenerateServerProfileIdentifier(); 175 void GenerateServerProfileIdentifier();
176 176
177 // Logs the number of days since the profile was last used and records its 177 // Logs the number of days since the profile was last used and records its
178 // use. 178 // use.
179 void RecordAndLogUse(); 179 void RecordAndLogUse();
180 180
181 // Valid only when type() == SERVER_PROFILE.
182 bool has_converted() const { return has_converted_; }
183 void set_has_converted(bool has_converted) { has_converted_ = has_converted; }
184
181 private: 185 private:
182 typedef std::vector<const FormGroup*> FormGroupList; 186 typedef std::vector<const FormGroup*> FormGroupList;
183 187
184 // FormGroup: 188 // FormGroup:
185 void GetSupportedTypes(ServerFieldTypeSet* supported_types) const override; 189 void GetSupportedTypes(ServerFieldTypeSet* supported_types) const override;
186 190
187 // Creates inferred labels for |profiles| at indices corresponding to 191 // Creates inferred labels for |profiles| at indices corresponding to
188 // |indices|, and stores the results to the corresponding elements of 192 // |indices|, and stores the results to the corresponding elements of
189 // |labels|. These labels include enough fields to differentiate among the 193 // |labels|. These labels include enough fields to differentiate among the
190 // profiles, if possible; and also at least |num_fields_to_include| fields, if 194 // profiles, if possible; and also at least |num_fields_to_include| fields, if
(...skipping 23 matching lines...) Expand all
214 CompanyInfo company_; 218 CompanyInfo company_;
215 PhoneNumber phone_number_; 219 PhoneNumber phone_number_;
216 Address address_; 220 Address address_;
217 221
218 // The BCP 47 language code that can be used to format |address_| for display. 222 // The BCP 47 language code that can be used to format |address_| for display.
219 std::string language_code_; 223 std::string language_code_;
220 224
221 // ID used for identifying this profile. Only set for SERVER_PROFILEs. This is 225 // ID used for identifying this profile. Only set for SERVER_PROFILEs. This is
222 // a hash of the contents. 226 // a hash of the contents.
223 std::string server_id_; 227 std::string server_id_;
228
229 // Only useful for SERVER_PROFILEs. Whether this server profile has been
230 // converted to a local profile.
231 bool has_converted_;
224 }; 232 };
225 233
226 // So we can compare AutofillProfiles with EXPECT_EQ(). 234 // So we can compare AutofillProfiles with EXPECT_EQ().
227 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); 235 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile);
228 236
229 } // namespace autofill 237 } // namespace autofill
230 238
231 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ 239 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698