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

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

Issue 996973003: Revamp Autofill Wallet settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac compiles Created 5 years, 9 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
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 16 matching lines...) Expand all
27 // form information from the profile, and the profile will delegate the request 27 // form information from the profile, and the profile will delegate the request
28 // to the requested form group type. 28 // to the requested form group type.
29 class AutofillProfile : public AutofillDataModel { 29 class AutofillProfile : public AutofillDataModel {
30 public: 30 public:
31 enum RecordType { 31 enum RecordType {
32 // A profile stored and editable locally. 32 // A profile stored and editable locally.
33 LOCAL_PROFILE, 33 LOCAL_PROFILE,
34 34
35 // A profile synced down from the server. These are read-only locally. 35 // A profile synced down from the server. These are read-only locally.
36 SERVER_PROFILE, 36 SERVER_PROFILE,
37
38 // An auxiliary profile, such as a Mac address book entry.
39 AUXILIARY_PROFILE,
37 }; 40 };
38 41
39 AutofillProfile(const std::string& guid, const std::string& origin); 42 AutofillProfile(const std::string& guid, const std::string& origin);
40 43
41 // Server profile constructor. The type must be SERVER_PROFILE (this serves 44 // Server profile constructor. The type must be SERVER_PROFILE (this serves
42 // to differentiate this constructor). 45 // to differentiate this constructor).
43 AutofillProfile(RecordType type, const std::string& server_id); 46 AutofillProfile(RecordType type, const std::string& server_id);
44 47
45 // For use in STL containers. 48 // For use in STL containers.
46 AutofillProfile(); 49 AutofillProfile();
(...skipping 15 matching lines...) Expand all
62 const std::string& app_locale) override; 65 const std::string& app_locale) override;
63 66
64 // AutofillDataModel: 67 // AutofillDataModel:
65 base::string16 GetInfoForVariant( 68 base::string16 GetInfoForVariant(
66 const AutofillType& type, 69 const AutofillType& type,
67 size_t variant, 70 size_t variant,
68 const std::string& app_locale) const override; 71 const std::string& app_locale) const override;
69 72
70 // How this card is stored. 73 // How this card is stored.
71 RecordType record_type() const { return record_type_; } 74 RecordType record_type() const { return record_type_; }
75 void set_record_type(RecordType type) { record_type_ = type; }
72 76
73 // Multi-value equivalents to |GetInfo| and |SetInfo|. 77 // Multi-value equivalents to |GetInfo| and |SetInfo|.
74 void SetRawMultiInfo(ServerFieldType type, 78 void SetRawMultiInfo(ServerFieldType type,
75 const std::vector<base::string16>& values); 79 const std::vector<base::string16>& values);
76 void GetRawMultiInfo(ServerFieldType type, 80 void GetRawMultiInfo(ServerFieldType type,
77 std::vector<base::string16>* values) const; 81 std::vector<base::string16>* values) const;
78 void SetMultiInfo(const AutofillType& type, 82 void SetMultiInfo(const AutofillType& type,
79 const std::vector<base::string16>& values, 83 const std::vector<base::string16>& values,
80 const std::string& app_locale); 84 const std::string& app_locale);
81 void GetMultiInfo(const AutofillType& type, 85 void GetMultiInfo(const AutofillType& type,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // ID assigned by the server. This will be set only for WALLET_PROFILEs. 260 // ID assigned by the server. This will be set only for WALLET_PROFILEs.
257 std::string server_id_; 261 std::string server_id_;
258 }; 262 };
259 263
260 // So we can compare AutofillProfiles with EXPECT_EQ(). 264 // So we can compare AutofillProfiles with EXPECT_EQ().
261 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); 265 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile);
262 266
263 } // namespace autofill 267 } // namespace autofill
264 268
265 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ 269 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | components/autofill/core/browser/personal_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698