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

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

Issue 6673079: Reduce boxing and unboxing of AutofillFieldType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile on Windows. 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
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_MANAGER_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 const webkit_glue::FormData& form, 133 const webkit_glue::FormData& form,
134 const webkit_glue::FormField& field, 134 const webkit_glue::FormField& field,
135 FormStructure** form_structure, 135 FormStructure** form_structure,
136 AutofillField** autofill_field) WARN_UNUSED_RESULT; 136 AutofillField** autofill_field) WARN_UNUSED_RESULT;
137 137
138 // Returns a list of values from the stored profiles that match |type| and the 138 // Returns a list of values from the stored profiles that match |type| and the
139 // value of |field| and returns the labels of the matching profiles. |labels| 139 // value of |field| and returns the labels of the matching profiles. |labels|
140 // is filled with the Profile label. 140 // is filled with the Profile label.
141 void GetProfileSuggestions(FormStructure* form, 141 void GetProfileSuggestions(FormStructure* form,
142 const webkit_glue::FormField& field, 142 const webkit_glue::FormField& field,
143 AutofillType type, 143 AutofillFieldType type,
144 std::vector<string16>* values, 144 std::vector<string16>* values,
145 std::vector<string16>* labels, 145 std::vector<string16>* labels,
146 std::vector<string16>* icons, 146 std::vector<string16>* icons,
147 std::vector<int>* unique_ids); 147 std::vector<int>* unique_ids);
148 148
149 // Returns a list of values from the stored credit cards that match |type| and 149 // Returns a list of values from the stored credit cards that match |type| and
150 // the value of |field| and returns the labels of the matching credit cards. 150 // the value of |field| and returns the labels of the matching credit cards.
151 void GetCreditCardSuggestions(FormStructure* form, 151 void GetCreditCardSuggestions(FormStructure* form,
152 const webkit_glue::FormField& field, 152 const webkit_glue::FormField& field,
153 AutofillType type, 153 AutofillFieldType type,
154 std::vector<string16>* values, 154 std::vector<string16>* values,
155 std::vector<string16>* labels, 155 std::vector<string16>* labels,
156 std::vector<string16>* icons, 156 std::vector<string16>* icons,
157 std::vector<int>* unique_ids); 157 std::vector<int>* unique_ids);
158 158
159 // Set |field| argument's value based on |type| and contents of the 159 // Set |field| argument's value based on |type| and contents of the
160 // |credit_card|. 160 // |credit_card|.
161 void FillCreditCardFormField(const CreditCard* credit_card, 161 void FillCreditCardFormField(const CreditCard* credit_card,
162 AutofillType type, 162 AutofillFieldType type,
163 webkit_glue::FormField* field); 163 webkit_glue::FormField* field);
164 164
165 // Set |field| argument's value based on |type| and contents of the |profile|. 165 // Set |field| argument's value based on |type| and contents of the |profile|.
166 void FillFormField(const AutofillProfile* profile, 166 void FillFormField(const AutofillProfile* profile,
167 AutofillType type, 167 AutofillFieldType type,
168 webkit_glue::FormField* field); 168 webkit_glue::FormField* field);
169 169
170 // Set |field| argument's value for phone/fax number based on contents of the 170 // Set |field| argument's value for phone/fax number based on contents of the
171 // |profile|. |type| is the type of the phone. 171 // |profile|. |type| is the type of the phone.
172 void FillPhoneNumberField(const AutofillProfile* profile, 172 void FillPhoneNumberField(const AutofillProfile* profile,
173 AutofillType type, 173 AutofillFieldType type,
174 webkit_glue::FormField* field); 174 webkit_glue::FormField* field);
175 175
176 // Parses the forms using heuristic matching and querying the Autofill server. 176 // Parses the forms using heuristic matching and querying the Autofill server.
177 void ParseForms(const std::vector<webkit_glue::FormData>& forms); 177 void ParseForms(const std::vector<webkit_glue::FormData>& forms);
178 178
179 // Uses existing personal data to determine possible field types for the 179 // Uses existing personal data to determine possible field types for the
180 // |submitted_form|. 180 // |submitted_form|.
181 void DeterminePossibleFieldTypesForUpload(FormStructure* submitted_form); 181 void DeterminePossibleFieldTypesForUpload(FormStructure* submitted_form);
182 182
183 // Logs quality metrics for the submitted |form|, which should be logically 183 // Logs quality metrics for the submitted |form|, which should be logically
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, 239 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest,
240 NoQualityMetricsForNonAutofillableForms); 240 NoQualityMetricsForNonAutofillableForms);
241 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch); 241 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch);
242 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsForFailure); 242 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsForFailure);
243 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsWithExperimentId); 243 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsWithExperimentId);
244 244
245 DISALLOW_COPY_AND_ASSIGN(AutofillManager); 245 DISALLOW_COPY_AND_ASSIGN(AutofillManager);
246 }; 246 };
247 247
248 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 248 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698