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

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

Issue 347183005: autofill names - dont parse when calling SetRawInfo(FULL_NAME) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android test expectation Created 6 years, 5 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 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_CONTACT_INFO_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "components/autofill/core/browser/form_group.h" 13 #include "components/autofill/core/browser/form_group.h"
14 14
15 namespace autofill { 15 namespace autofill {
16 16
17 // A form group that stores name information. 17 // A form group that stores name information.
18 class NameInfo : public FormGroup { 18 class NameInfo : public FormGroup {
19 public: 19 public:
20 NameInfo(); 20 NameInfo();
21 NameInfo(const NameInfo& info); 21 NameInfo(const NameInfo& info);
22 virtual ~NameInfo(); 22 virtual ~NameInfo();
23 23
24 NameInfo& operator=(const NameInfo& info); 24 NameInfo& operator=(const NameInfo& info);
25 25
26 // Compares |NameInfo| objects for |first_|, |middle_| and |last_| names, 26 // Compares |NameInfo| objects for |given_|, |middle_| and |family_| names,
27 // ignoring their case differences. 27 // ignoring their case differences.
28 bool EqualsIgnoreCase(const NameInfo& info); 28 bool ParsedNamesAreEqual(const NameInfo& info);
29 29
30 // FormGroup: 30 // FormGroup:
31 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE; 31 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE;
32 virtual void SetRawInfo(ServerFieldType type, 32 virtual void SetRawInfo(ServerFieldType type,
33 const base::string16& value) OVERRIDE; 33 const base::string16& value) OVERRIDE;
34 virtual base::string16 GetInfo(const AutofillType& type,
35 const std::string& app_locale) const OVERRIDE;
36 virtual bool SetInfo(const AutofillType& type,
37 const base::string16& value,
38 const std::string& app_locale) OVERRIDE;
34 39
35 private: 40 private:
36 // FormGroup: 41 // FormGroup:
37 virtual void GetSupportedTypes( 42 virtual void GetSupportedTypes(
38 ServerFieldTypeSet* supported_types) const OVERRIDE; 43 ServerFieldTypeSet* supported_types) const OVERRIDE;
39 44
40 // Returns the full name, which is either |full_|, or if |full_| is empty, 45 // Returns the full name, which is either |full_|, or if |full_| is empty,
41 // is composed of given, middle and family. 46 // is composed of given, middle and family.
42 base::string16 FullName() const; 47 base::string16 FullName() const;
43 48
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // FormGroup: 97 // FormGroup:
93 virtual void GetSupportedTypes( 98 virtual void GetSupportedTypes(
94 ServerFieldTypeSet* supported_types) const OVERRIDE; 99 ServerFieldTypeSet* supported_types) const OVERRIDE;
95 100
96 base::string16 company_name_; 101 base::string16 company_name_;
97 }; 102 };
98 103
99 } // namespace autofill 104 } // namespace autofill
100 105
101 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_ 106 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_profile_unittest.cc ('k') | components/autofill/core/browser/contact_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698