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

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

Issue 13973004: Convert string16 -> base::string16 in components/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_CONTACT_INFO_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_CONTACT_INFO_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_CONTACT_INFO_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_CONTACT_INFO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "components/autofill/browser/field_types.h" 12 #include "components/autofill/browser/field_types.h"
13 #include "components/autofill/browser/form_group.h" 13 #include "components/autofill/browser/form_group.h"
14 14
15 // A form group that stores name information. 15 // A form group that stores name information.
16 class NameInfo : public FormGroup { 16 class NameInfo : public FormGroup {
17 public: 17 public:
18 NameInfo(); 18 NameInfo();
19 NameInfo(const NameInfo& info); 19 NameInfo(const NameInfo& info);
20 virtual ~NameInfo(); 20 virtual ~NameInfo();
21 21
22 NameInfo& operator=(const NameInfo& info); 22 NameInfo& operator=(const NameInfo& info);
23 23
24 // FormGroup: 24 // FormGroup:
25 virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; 25 virtual base::string16 GetRawInfo(AutofillFieldType type) const OVERRIDE;
26 virtual void SetRawInfo(AutofillFieldType type, 26 virtual void SetRawInfo(AutofillFieldType type,
27 const string16& value) OVERRIDE; 27 const base::string16& value) OVERRIDE;
28 28
29 private: 29 private:
30 // FormGroup: 30 // FormGroup:
31 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; 31 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE;
32 32
33 // Returns the full name, which can include up to the first, middle, and last 33 // Returns the full name, which can include up to the first, middle, and last
34 // name. 34 // name.
35 string16 FullName() const; 35 base::string16 FullName() const;
36 36
37 // Returns the middle initial if |middle_| is non-empty. Returns an empty 37 // Returns the middle initial if |middle_| is non-empty. Returns an empty
38 // string otherwise. 38 // string otherwise.
39 string16 MiddleInitial() const; 39 base::string16 MiddleInitial() const;
40 40
41 const string16& first() const { return first_; } 41 const base::string16& first() const { return first_; }
42 const string16& middle() const { return middle_; } 42 const base::string16& middle() const { return middle_; }
43 const string16& last() const { return last_; } 43 const base::string16& last() const { return last_; }
44 44
45 // Sets |first_|, |middle_|, and |last_| to the tokenized |full|. 45 // Sets |first_|, |middle_|, and |last_| to the tokenized |full|.
46 // It is tokenized on a space only. 46 // It is tokenized on a space only.
47 void SetFullName(const string16& full); 47 void SetFullName(const base::string16& full);
48 48
49 string16 first_; 49 base::string16 first_;
50 string16 middle_; 50 base::string16 middle_;
51 string16 last_; 51 base::string16 last_;
52 }; 52 };
53 53
54 class EmailInfo : public FormGroup { 54 class EmailInfo : public FormGroup {
55 public: 55 public:
56 EmailInfo(); 56 EmailInfo();
57 EmailInfo(const EmailInfo& info); 57 EmailInfo(const EmailInfo& info);
58 virtual ~EmailInfo(); 58 virtual ~EmailInfo();
59 59
60 EmailInfo& operator=(const EmailInfo& info); 60 EmailInfo& operator=(const EmailInfo& info);
61 61
62 // FormGroup: 62 // FormGroup:
63 virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; 63 virtual base::string16 GetRawInfo(AutofillFieldType type) const OVERRIDE;
64 virtual void SetRawInfo(AutofillFieldType type, 64 virtual void SetRawInfo(AutofillFieldType type,
65 const string16& value) OVERRIDE; 65 const base::string16& value) OVERRIDE;
66 66
67 private: 67 private:
68 // FormGroup: 68 // FormGroup:
69 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; 69 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE;
70 70
71 string16 email_; 71 base::string16 email_;
72 }; 72 };
73 73
74 class CompanyInfo : public FormGroup { 74 class CompanyInfo : public FormGroup {
75 public: 75 public:
76 CompanyInfo(); 76 CompanyInfo();
77 CompanyInfo(const CompanyInfo& info); 77 CompanyInfo(const CompanyInfo& info);
78 virtual ~CompanyInfo(); 78 virtual ~CompanyInfo();
79 79
80 CompanyInfo& operator=(const CompanyInfo& info); 80 CompanyInfo& operator=(const CompanyInfo& info);
81 81
82 // FormGroup: 82 // FormGroup:
83 virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; 83 virtual base::string16 GetRawInfo(AutofillFieldType type) const OVERRIDE;
84 virtual void SetRawInfo(AutofillFieldType type, 84 virtual void SetRawInfo(AutofillFieldType type,
85 const string16& value) OVERRIDE; 85 const base::string16& value) OVERRIDE;
86 86
87 private: 87 private:
88 // FormGroup: 88 // FormGroup:
89 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; 89 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE;
90 90
91 string16 company_name_; 91 base::string16 company_name_;
92 }; 92 };
93 93
94 #endif // COMPONENTS_AUTOFILL_BROWSER_CONTACT_INFO_H_ 94 #endif // COMPONENTS_AUTOFILL_BROWSER_CONTACT_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698