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

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

Issue 11360055: [Autofill] Rename GetInfo and SetInfo to GetRawInfo and SetRawInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase harder Created 8 years, 1 month 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 | « chrome/browser/autofill/credit_card_unittest.cc ('k') | chrome/browser/autofill/form_group.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_FORM_GROUP_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_
6 #define CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_ 6 #define CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 10 matching lines...) Expand all
21 // Used to determine the type of a field based on the text that a user enters 21 // Used to determine the type of a field based on the text that a user enters
22 // into the field. The field types can then be reported back to the server. 22 // into the field. The field types can then be reported back to the server.
23 // This method is additive on |matching_types|. 23 // This method is additive on |matching_types|.
24 virtual void GetMatchingTypes(const string16& text, 24 virtual void GetMatchingTypes(const string16& text,
25 FieldTypeSet* matching_types) const; 25 FieldTypeSet* matching_types) const;
26 26
27 // Returns a set of AutofillFieldTypes for which this FormGroup has non-empty 27 // Returns a set of AutofillFieldTypes for which this FormGroup has non-empty
28 // data. This method is additive on |non_empty_types|. 28 // data. This method is additive on |non_empty_types|.
29 virtual void GetNonEmptyTypes(FieldTypeSet* non_empty_types) const; 29 virtual void GetNonEmptyTypes(FieldTypeSet* non_empty_types) const;
30 30
31 // Returns the literal string associated with |type|. 31 // Returns the string associated with |type|, without canonicalizing the
32 virtual string16 GetInfo(AutofillFieldType type) const = 0; 32 // returned value. For user-visible strings, use GetCanonicalizedInfo()
33 // instead.
34 virtual string16 GetRawInfo(AutofillFieldType type) const = 0;
33 35
34 // Used to populate this FormGroup object with data. 36 // Sets this FormGroup object's data for |type| to |value|, without
35 virtual void SetInfo(AutofillFieldType type, const string16& value) = 0; 37 // canonicalizing the |value|. For data that has not already been
38 // canonicalized, use SetCanonicalizedInfo() instead.
39 virtual void SetRawInfo(AutofillFieldType type, const string16& value) = 0;
36 40
37 // Returns the string that should be auto-filled into a text field given the 41 // Returns the string that should be auto-filled into a text field given the
38 // type of that field. 42 // type of that field.
39 virtual string16 GetCanonicalizedInfo(AutofillFieldType type) const; 43 virtual string16 GetCanonicalizedInfo(AutofillFieldType type) const;
40 44
41 // Used to populate this FormGroup object with data. Canonicalizes the data 45 // Used to populate this FormGroup object with data. Canonicalizes the data
42 // prior to storing, if appropriate. 46 // prior to storing, if appropriate.
43 virtual bool SetCanonicalizedInfo(AutofillFieldType type, 47 virtual bool SetCanonicalizedInfo(AutofillFieldType type,
44 const string16& value); 48 const string16& value);
45 49
46 protected: 50 protected:
47 // AutofillProfile needs to call into GetSupportedTypes() for objects of 51 // AutofillProfile needs to call into GetSupportedTypes() for objects of
48 // non-AutofillProfile type, for which mere inheritance is insufficient. 52 // non-AutofillProfile type, for which mere inheritance is insufficient.
49 friend class AutofillProfile; 53 friend class AutofillProfile;
50 54
51 // Returns a set of AutofillFieldTypes for which this FormGroup can store 55 // Returns a set of AutofillFieldTypes for which this FormGroup can store
52 // data. This method is additive on |supported_types|. 56 // data. This method is additive on |supported_types|.
53 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const = 0; 57 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const = 0;
54 }; 58 };
55 59
56 #endif // CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_ 60 #endif // CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/credit_card_unittest.cc ('k') | chrome/browser/autofill/form_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698