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

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

Issue 2818033: AutoFill: Aggregate profile data. Remove the AutoFill InfoBar. (Closed)
Patch Set: Comment. Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_PHONE_NUMBER_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_
6 #define CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ 6 #define CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "chrome/browser/autofill/form_group.h" 11 #include "chrome/browser/autofill/form_group.h"
12 12
13 // A form group that stores phone number information. 13 // A form group that stores phone number information.
14 class PhoneNumber : public FormGroup { 14 class PhoneNumber : public FormGroup {
15 public: 15 public:
16 PhoneNumber() {} 16 PhoneNumber() {}
17 virtual ~PhoneNumber() {} 17 virtual ~PhoneNumber() {}
18 18
19 // FormGroup implementation: 19 // FormGroup implementation:
20 virtual FormGroup* Clone() const = 0; 20 virtual FormGroup* Clone() const = 0;
21 virtual void GetPossibleFieldTypes(const string16& text, 21 virtual void GetPossibleFieldTypes(const string16& text,
22 FieldTypeSet* possible_types) const; 22 FieldTypeSet* possible_types) const;
23 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const;
23 virtual void FindInfoMatches(const AutoFillType& type, 24 virtual void FindInfoMatches(const AutoFillType& type,
24 const string16& info, 25 const string16& info,
25 std::vector<string16>* matched_text) const; 26 std::vector<string16>* matched_text) const;
26 virtual string16 GetFieldText(const AutoFillType& type) const; 27 virtual string16 GetFieldText(const AutoFillType& type) const;
27 virtual void SetInfo(const AutoFillType& type, const string16& value); 28 virtual void SetInfo(const AutoFillType& type, const string16& value);
28 29
29 // Parses |value| to extract the components of a phone number. |number| 30 // Parses |value| to extract the components of a phone number. |number|
30 // returns the trailing 7 digits, |city_code| returns the next 3 digits, and 31 // returns the trailing 7 digits, |city_code| returns the next 3 digits, and
31 // |country_code| returns any remaining digits. 32 // |country_code| returns any remaining digits.
32 // Separator characters are stripped before parsing the digits. 33 // Separator characters are stripped before parsing the digits.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static void StripPunctuation(string16* number); 92 static void StripPunctuation(string16* number);
92 93
93 // The pieces of the phone number. 94 // The pieces of the phone number.
94 string16 country_code_; 95 string16 country_code_;
95 string16 city_code_; // city or area code. 96 string16 city_code_; // city or area code.
96 string16 number_; 97 string16 number_;
97 string16 extension_; 98 string16 extension_;
98 }; 99 };
99 100
100 #endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ 101 #endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/personal_data_manager_unittest.cc ('k') | chrome/browser/autofill/phone_number.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698