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

Side by Side Diff: components/autofill/core/browser/autofill_field.h

Issue 1686063004: Sending generated vote on password generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed reviewers comments Created 4 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void set_default_value(const std::string& value) { default_value_ = value; } 75 void set_default_value(const std::string& value) { default_value_ = value; }
76 const std::string& default_value() const { return default_value_; } 76 const std::string& default_value() const { return default_value_; }
77 77
78 void set_credit_card_number_offset(size_t position) { 78 void set_credit_card_number_offset(size_t position) {
79 credit_card_number_offset_ = position; 79 credit_card_number_offset_ = position;
80 } 80 }
81 size_t credit_card_number_offset() const { 81 size_t credit_card_number_offset() const {
82 return credit_card_number_offset_; 82 return credit_card_number_offset_;
83 } 83 }
84 84
85 void set_generation_type(PasswordGenerationType type) {
86 generation_type_ = type;
87 }
88 PasswordGenerationType generation_type() const { return generation_type_; }
89
85 // Set |field_data|'s value to |value|. Uses |field|, |address_language_code|, 90 // Set |field_data|'s value to |value|. Uses |field|, |address_language_code|,
86 // and |app_locale| as hints when filling exceptional cases like phone number 91 // and |app_locale| as hints when filling exceptional cases like phone number
87 // values and <select> fields. Returns |true| if the field has been filled, 92 // values and <select> fields. Returns |true| if the field has been filled,
88 // |false| otherwise. 93 // |false| otherwise.
89 static bool FillFormField(const AutofillField& field, 94 static bool FillFormField(const AutofillField& field,
90 const base::string16& value, 95 const base::string16& value,
91 const std::string& address_language_code, 96 const std::string& address_language_code,
92 const std::string& app_locale, 97 const std::string& app_locale,
93 FormFieldData* field_data); 98 FormFieldData* field_data);
94 99
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 size_t credit_card_number_offset_; 146 size_t credit_card_number_offset_;
142 147
143 // Whether the field was autofilled then later edited. 148 // Whether the field was autofilled then later edited.
144 bool previously_autofilled_; 149 bool previously_autofilled_;
145 150
146 // The parseable name attribute, with unnecessary information removed (such as 151 // The parseable name attribute, with unnecessary information removed (such as
147 // a common prefix shared with other fields). Will be used for heuristics 152 // a common prefix shared with other fields). Will be used for heuristics
148 // parsing. 153 // parsing.
149 base::string16 parseable_name_; 154 base::string16 parseable_name_;
150 155
156 // The type of password generation event, if it happened.
157 PasswordGenerationType generation_type_;
Mathieu 2016/02/22 13:25:20 This should be of type AutofillUploadContents::Fie
dvadym 2016/02/22 14:52:32 Done.
158
151 DISALLOW_COPY_AND_ASSIGN(AutofillField); 159 DISALLOW_COPY_AND_ASSIGN(AutofillField);
152 }; 160 };
153 161
154 } // namespace autofill 162 } // namespace autofill
155 163
156 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ 164 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698