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

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

Issue 310463005: Fill in more name fields with requestAutocomplete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: todo Created 6 years, 6 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"
(...skipping 15 matching lines...) Expand all
26 // FormGroup: 26 // FormGroup:
27 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE; 27 virtual base::string16 GetRawInfo(ServerFieldType type) const OVERRIDE;
28 virtual void SetRawInfo(ServerFieldType type, 28 virtual void SetRawInfo(ServerFieldType type,
29 const base::string16& value) OVERRIDE; 29 const base::string16& value) OVERRIDE;
30 30
31 private: 31 private:
32 // FormGroup: 32 // FormGroup:
33 virtual void GetSupportedTypes( 33 virtual void GetSupportedTypes(
34 ServerFieldTypeSet* supported_types) const OVERRIDE; 34 ServerFieldTypeSet* supported_types) const OVERRIDE;
35 35
36 // Returns the full name, which can include up to the first, middle, and last 36 // Returns the full name, which is either |full_|, or if |full_| is empty,
37 // name. 37 // is composed of given, middle and family.
38 base::string16 FullName() const; 38 base::string16 FullName() const;
39 39
40 // Returns the middle initial if |middle_| is non-empty. Returns an empty 40 // Returns the middle initial if |middle_| is non-empty. Returns an empty
41 // string otherwise. 41 // string otherwise.
42 base::string16 MiddleInitial() const; 42 base::string16 MiddleInitial() const;
43 43
44 const base::string16& first() const { return first_; } 44 // Sets |given_|, |middle_|, and |family_| to the tokenized |full|.
45 const base::string16& middle() const { return middle_; }
46 const base::string16& last() const { return last_; }
47
48 // Sets |first_|, |middle_|, and |last_| to the tokenized |full|.
49 // It is tokenized on a space only.
50 void SetFullName(const base::string16& full); 45 void SetFullName(const base::string16& full);
51 46
52 base::string16 first_; 47 base::string16 given_;
53 base::string16 middle_; 48 base::string16 middle_;
54 base::string16 last_; 49 base::string16 family_;
50 base::string16 full_;
55 }; 51 };
56 52
57 class EmailInfo : public FormGroup { 53 class EmailInfo : public FormGroup {
58 public: 54 public:
59 EmailInfo(); 55 EmailInfo();
60 EmailInfo(const EmailInfo& info); 56 EmailInfo(const EmailInfo& info);
61 virtual ~EmailInfo(); 57 virtual ~EmailInfo();
62 58
63 EmailInfo& operator=(const EmailInfo& info); 59 EmailInfo& operator=(const EmailInfo& info);
64 60
(...skipping 27 matching lines...) Expand all
92 // FormGroup: 88 // FormGroup:
93 virtual void GetSupportedTypes( 89 virtual void GetSupportedTypes(
94 ServerFieldTypeSet* supported_types) const OVERRIDE; 90 ServerFieldTypeSet* supported_types) const OVERRIDE;
95 91
96 base::string16 company_name_; 92 base::string16 company_name_;
97 }; 93 };
98 94
99 } // namespace autofill 95 } // namespace autofill
100 96
101 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_ 97 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CONTACT_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698