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

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

Issue 11415221: Add support for autofilling radio buttons and checkboxes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address comments Created 8 years 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) 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_AUTOFILL_FIELD_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 bool IsEmpty() const; 49 bool IsEmpty() const;
50 50
51 // The unique signature of this field, composed of the field name and the html 51 // The unique signature of this field, composed of the field name and the html
52 // input type in a 32-bit hash. 52 // input type in a 32-bit hash.
53 std::string FieldSignature() const; 53 std::string FieldSignature() const;
54 54
55 // Returns true if the field type has been determined (without the text in the 55 // Returns true if the field type has been determined (without the text in the
56 // field). 56 // field).
57 bool IsFieldFillable() const; 57 bool IsFieldFillable() const;
58 58
59 void set_default_value(const std::string& value) { default_value_ = value; }
60 const std::string& default_value() const { return default_value_; }
61
59 private: 62 private:
60 // The unique name of this field, generated by Autofill. 63 // The unique name of this field, generated by Autofill.
61 string16 unique_name_; 64 string16 unique_name_;
62 65
63 // The unique identifier for the section (e.g. billing vs. shipping address) 66 // The unique identifier for the section (e.g. billing vs. shipping address)
64 // that this field belongs to. 67 // that this field belongs to.
65 std::string section_; 68 std::string section_;
66 69
67 // The type of the field, as determined by the Autofill server. 70 // The type of the field, as determined by the Autofill server.
68 AutofillFieldType server_type_; 71 AutofillFieldType server_type_;
69 72
70 // The type of the field, as determined by the local heuristics. 73 // The type of the field, as determined by the local heuristics.
71 AutofillFieldType heuristic_type_; 74 AutofillFieldType heuristic_type_;
72 75
73 // The set of possible types for this field. 76 // The set of possible types for this field.
74 FieldTypeSet possible_types_; 77 FieldTypeSet possible_types_;
75 78
76 // Used to track whether this field is a phone prefix or suffix. 79 // Used to track whether this field is a phone prefix or suffix.
77 PhonePart phone_part_; 80 PhonePart phone_part_;
78 81
82 // Used to park the default value returned by the Autofill server.
Evan Stade 2012/12/07 19:21:14 I don't understand this use of "park". How about j
Raman Kakilate 2012/12/10 18:36:45 Done.
83 std::string default_value_;
84
79 DISALLOW_COPY_AND_ASSIGN(AutofillField); 85 DISALLOW_COPY_AND_ASSIGN(AutofillField);
80 }; 86 };
81 87
82 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ 88 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_field.cc » ('j') | chrome/browser/autofill/autofill_manager_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698