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

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

Issue 261993006: Modified to allow to preserve two-word string in first-name and last-name in autofill profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated review comments. Created 6 years, 7 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Multi-value equivalents to |GetInfo| and |SetInfo|. 62 // Multi-value equivalents to |GetInfo| and |SetInfo|.
63 void SetRawMultiInfo(ServerFieldType type, 63 void SetRawMultiInfo(ServerFieldType type,
64 const std::vector<base::string16>& values); 64 const std::vector<base::string16>& values);
65 void GetRawMultiInfo(ServerFieldType type, 65 void GetRawMultiInfo(ServerFieldType type,
66 std::vector<base::string16>* values) const; 66 std::vector<base::string16>* values) const;
67 void GetMultiInfo(const AutofillType& type, 67 void GetMultiInfo(const AutofillType& type,
68 const std::string& app_locale, 68 const std::string& app_locale,
69 std::vector<base::string16>* values) const; 69 std::vector<base::string16>* values) const;
70 70
71 void SetPreferredNameInfo(const std::vector<NameInfo>& profiles);
Ilya Sherman 2014/05/29 07:38:03 nit: This should have private visibility.
Pritam Nikam 2014/05/30 11:12:40 To provide unit-test this need to have public visi
72
71 // Returns true if there are no values (field types) set. 73 // Returns true if there are no values (field types) set.
72 bool IsEmpty(const std::string& app_locale) const; 74 bool IsEmpty(const std::string& app_locale) const;
73 75
74 // Returns true if the |type| of data in this profile is present, but invalid. 76 // Returns true if the |type| of data in this profile is present, but invalid.
75 // Otherwise returns false. 77 // Otherwise returns false.
76 bool IsPresentButInvalid(ServerFieldType type) const; 78 bool IsPresentButInvalid(ServerFieldType type) const;
77 79
78 // Comparison for Sync. Returns 0 if the profile is the same as |this|, 80 // Comparison for Sync. Returns 0 if the profile is the same as |this|,
79 // or < 0, or > 0 if it is different. The implied ordering can be used for 81 // or < 0, or > 0 if it is different. The implied ordering can be used for
80 // culling duplicates. The ordering is based on collation order of the 82 // culling duplicates. The ordering is based on collation order of the
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // The BCP 47 language code that can be used to format |address_| for display. 203 // The BCP 47 language code that can be used to format |address_| for display.
202 std::string language_code_; 204 std::string language_code_;
203 }; 205 };
204 206
205 // So we can compare AutofillProfiles with EXPECT_EQ(). 207 // So we can compare AutofillProfiles with EXPECT_EQ().
206 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); 208 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile);
207 209
208 } // namespace autofill 210 } // namespace autofill
209 211
210 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ 212 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698