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

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 864873002: Autofill - don't respect autocomplete="off" for mac address book or (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac test expectation Created 5 years, 11 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
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager_unittest.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 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 #include "components/autofill/core/browser/autofill_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 } 1101 }
1102 1102
1103 // Even though we always update the cache, the field might not exist if the 1103 // Even though we always update the cache, the field might not exist if the
1104 // website disables autocomplete while the user is interacting with the form. 1104 // website disables autocomplete while the user is interacting with the form.
1105 // See http://crbug.com/160476 1105 // See http://crbug.com/160476
1106 return *autofill_field != NULL; 1106 return *autofill_field != NULL;
1107 } 1107 }
1108 1108
1109 AutofillField* AutofillManager::GetAutofillField(const FormData& form, 1109 AutofillField* AutofillManager::GetAutofillField(const FormData& form,
1110 const FormFieldData& field) { 1110 const FormFieldData& field) {
1111 if (!personal_data_ || !field.should_autocomplete) 1111 if (!personal_data_)
1112 return NULL; 1112 return NULL;
1113 1113
1114 FormStructure* form_structure = NULL; 1114 FormStructure* form_structure = NULL;
1115 AutofillField* autofill_field = NULL; 1115 AutofillField* autofill_field = NULL;
1116 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) 1116 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field))
1117 return NULL; 1117 return NULL;
1118 1118
1119 if (!form_structure->IsAutofillable()) 1119 if (!form_structure->IsAutofillable())
1120 return NULL; 1120 return NULL;
1121 1121
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 return false; 1325 return false;
1326 1326
1327 // Disregard forms that we wouldn't ever autofill in the first place. 1327 // Disregard forms that we wouldn't ever autofill in the first place.
1328 if (!form.ShouldBeParsed()) 1328 if (!form.ShouldBeParsed())
1329 return false; 1329 return false;
1330 1330
1331 return true; 1331 return true;
1332 } 1332 }
1333 1333
1334 } // namespace autofill 1334 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698