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

Side by Side Diff: chrome/browser/autofill/address.h

Issue 6650014: Autofill extend profiles to include multi-valued fields, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autofill/address.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROME_BROWSER_AUTOFILL_ADDRESS_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_ADDRESS_H_
6 #define CHROME_BROWSER_AUTOFILL_ADDRESS_H_ 6 #define CHROME_BROWSER_AUTOFILL_ADDRESS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "chrome/browser/autofill/form_group.h" 13 #include "chrome/browser/autofill/form_group.h"
14 14
15 // A form group that stores address information. 15 // A form group that stores address information.
16 class Address : public FormGroup { 16 class Address : public FormGroup {
17 public: 17 public:
18 Address(); 18 Address();
19 explicit Address(const Address& address);
19 virtual ~Address(); 20 virtual ~Address();
20 21
22 Address& operator=(const Address& address);
23
21 // FormGroup: 24 // FormGroup:
22 virtual FormGroup* Clone() const;
23 virtual void GetPossibleFieldTypes(const string16& text, 25 virtual void GetPossibleFieldTypes(const string16& text,
24 FieldTypeSet* possible_types) const; 26 FieldTypeSet* possible_types) const;
25 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const; 27 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const;
26 virtual void FindInfoMatches(const AutofillType& type, 28 virtual void FindInfoMatches(const AutofillType& type,
27 const string16& info, 29 const string16& info,
28 std::vector<string16>* matched_text) const; 30 std::vector<string16>* matched_text) const;
29 virtual string16 GetFieldText(const AutofillType& type) const; 31 virtual string16 GetFieldText(const AutofillType& type) const;
30 virtual void SetInfo(const AutofillType& type, const string16& value); 32 virtual void SetInfo(const AutofillType& type, const string16& value);
31 33
32 const std::string& country_code() const { return country_code_; } 34 const std::string& country_code() const { return country_code_; }
33 void set_country_code(const std::string& country_code) { 35 void set_country_code(const std::string& country_code) {
34 country_code_ = country_code; 36 country_code_ = country_code;
35 } 37 }
36 38
37 // Sets all of the fields to the empty string. 39 // Sets all of the fields to the empty string.
38 void Clear(); 40 void Clear();
39 41
40 private: 42 private:
41 // Vector of tokens in an address line. 43 // Vector of tokens in an address line.
42 typedef std::vector<string16> LineTokens; 44 typedef std::vector<string16> LineTokens;
43 45
44 explicit Address(const Address& address);
45
46 void operator=(const Address& address);
47
48 // Returns the localized country name corresponding to |country_code_|. 46 // Returns the localized country name corresponding to |country_code_|.
49 string16 Country() const; 47 string16 Country() const;
50 48
51 void set_line1(const string16& line1); 49 void set_line1(const string16& line1);
52 void set_line2(const string16& line2); 50 void set_line2(const string16& line2);
53 51
54 // Sets the |country_code_| based on |country|, which should be a localized 52 // Sets the |country_code_| based on |country|, which should be a localized
55 // country name. 53 // country name.
56 void SetCountry(const string16& country); 54 void SetCountry(const string16& country);
57 55
(...skipping 26 matching lines...) Expand all
84 // The address. 82 // The address.
85 string16 line1_; 83 string16 line1_;
86 string16 line2_; 84 string16 line2_;
87 string16 city_; 85 string16 city_;
88 string16 state_; 86 string16 state_;
89 std::string country_code_; 87 std::string country_code_;
90 string16 zip_code_; 88 string16 zip_code_;
91 }; 89 };
92 90
93 #endif // CHROME_BROWSER_AUTOFILL_ADDRESS_H_ 91 #endif // CHROME_BROWSER_AUTOFILL_ADDRESS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698