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

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

Issue 7978048: Don't ask the browser for Autofill suggestions for non-autofillable form fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 9 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.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_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 <map> 10 #include <map>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // updating the cache. Returns false if the |form| is not autofillable, or if 155 // updating the cache. Returns false if the |form| is not autofillable, or if
156 // it is not already present in the cache and the cache is full. 156 // it is not already present in the cache and the cache is full.
157 bool GetCachedFormAndField(const webkit_glue::FormData& form, 157 bool GetCachedFormAndField(const webkit_glue::FormData& form,
158 const webkit_glue::FormField& field, 158 const webkit_glue::FormField& field,
159 FormStructure** form_structure, 159 FormStructure** form_structure,
160 AutofillField** autofill_field) WARN_UNUSED_RESULT; 160 AutofillField** autofill_field) WARN_UNUSED_RESULT;
161 161
162 // Re-parses |live_form| and adds the result to |form_structures_|. 162 // Re-parses |live_form| and adds the result to |form_structures_|.
163 // |cached_form| should be a pointer to the existing version of the form, or 163 // |cached_form| should be a pointer to the existing version of the form, or
164 // NULL if no cached version exists. The updated form is then written into 164 // NULL if no cached version exists. The updated form is then written into
165 // |updated_form|. 165 // |updated_form|. Returns false if the cache could not be updated.
166 void UpdateCachedForm(const webkit_glue::FormData& live_form, 166 bool UpdateCachedForm(const webkit_glue::FormData& live_form,
167 const FormStructure* cached_form, 167 const FormStructure* cached_form,
168 FormStructure** updated_form); 168 FormStructure** updated_form) WARN_UNUSED_RESULT;
169 169
170 // Returns a list of values from the stored profiles that match |type| and the 170 // Returns a list of values from the stored profiles that match |type| and the
171 // value of |field| and returns the labels of the matching profiles. |labels| 171 // value of |field| and returns the labels of the matching profiles. |labels|
172 // is filled with the Profile label. 172 // is filled with the Profile label.
173 void GetProfileSuggestions(FormStructure* form, 173 void GetProfileSuggestions(FormStructure* form,
174 const webkit_glue::FormField& field, 174 const webkit_glue::FormField& field,
175 AutofillFieldType type, 175 AutofillFieldType type,
176 std::vector<string16>* values, 176 std::vector<string16>* values,
177 std::vector<string16>* labels, 177 std::vector<string16>* labels,
178 std::vector<string16>* icons, 178 std::vector<string16>* icons,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch); 310 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch);
311 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, 311 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest,
312 UserHappinessFormLoadAndSubmission); 312 UserHappinessFormLoadAndSubmission);
313 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); 313 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction);
314 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration); 314 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration);
315 315
316 DISALLOW_COPY_AND_ASSIGN(AutofillManager); 316 DISALLOW_COPY_AND_ASSIGN(AutofillManager);
317 }; 317 };
318 318
319 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 319 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698