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

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

Issue 6673079: Reduce boxing and unboxing of AutofillFieldType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/autofill_type.h"
13 #include "chrome/browser/autofill/form_group.h" 14 #include "chrome/browser/autofill/form_group.h"
14 15
15 // A form group that stores address information. 16 // A form group that stores address information.
16 class Address : public FormGroup { 17 class Address : public FormGroup {
17 public: 18 public:
18 Address(); 19 Address();
19 explicit Address(const Address& address); 20 explicit Address(const Address& address);
20 virtual ~Address(); 21 virtual ~Address();
21 22
22 Address& operator=(const Address& address); 23 Address& operator=(const Address& address);
23 24
24 // FormGroup: 25 // FormGroup:
25 virtual void GetPossibleFieldTypes(const string16& text, 26 virtual void GetPossibleFieldTypes(const string16& text,
26 FieldTypeSet* possible_types) const; 27 FieldTypeSet* possible_types) const;
27 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const; 28 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const;
28 virtual void FindInfoMatches(const AutofillType& type, 29 virtual void FindInfoMatches(AutofillFieldType type,
29 const string16& info, 30 const string16& info,
30 std::vector<string16>* matched_text) const; 31 std::vector<string16>* matched_text) const;
31 virtual string16 GetFieldText(const AutofillType& type) const; 32 virtual string16 GetFieldText(AutofillFieldType type) const;
32 virtual void SetInfo(const AutofillType& type, const string16& value); 33 virtual void SetInfo(AutofillFieldType type, const string16& value);
33 34
34 const std::string& country_code() const { return country_code_; } 35 const std::string& country_code() const { return country_code_; }
35 void set_country_code(const std::string& country_code) { 36 void set_country_code(const std::string& country_code) {
36 country_code_ = country_code; 37 country_code_ = country_code;
37 } 38 }
38 39
39 // Sets all of the fields to the empty string. 40 // Sets all of the fields to the empty string.
40 void Clear(); 41 void Clear();
41 42
42 private: 43 private:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // The address. 83 // The address.
83 string16 line1_; 84 string16 line1_;
84 string16 line2_; 85 string16 line2_;
85 string16 city_; 86 string16 city_;
86 string16 state_; 87 string16 state_;
87 std::string country_code_; 88 std::string country_code_;
88 string16 zip_code_; 89 string16 zip_code_;
89 }; 90 };
90 91
91 #endif // CHROME_BROWSER_AUTOFILL_ADDRESS_H_ 92 #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