OLD | NEW |
---|---|
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 bool AutofillManager::ShouldShowAccessAddressBookSuggestion( | 285 bool AutofillManager::ShouldShowAccessAddressBookSuggestion( |
286 const FormData& form, | 286 const FormData& form, |
287 const FormFieldData& field) { | 287 const FormFieldData& field) { |
288 if (!personal_data_) | 288 if (!personal_data_) |
289 return false; | 289 return false; |
290 FormStructure* form_structure = NULL; | 290 FormStructure* form_structure = NULL; |
291 AutofillField* autofill_field = NULL; | 291 AutofillField* autofill_field = NULL; |
292 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) | 292 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) |
293 return false; | 293 return false; |
294 | 294 |
295 if (!field.should_autocomplete) | |
Evan Stade
2014/08/28 17:18:58
nit: combine this with the check on L288
erikchen
2014/08/28 17:28:46
Done.
| |
296 return false; | |
297 | |
295 return personal_data_->ShouldShowAccessAddressBookSuggestion( | 298 return personal_data_->ShouldShowAccessAddressBookSuggestion( |
296 autofill_field->Type()); | 299 autofill_field->Type()); |
297 } | 300 } |
298 | 301 |
299 bool AutofillManager::AccessAddressBook() { | 302 bool AutofillManager::AccessAddressBook() { |
300 if (!personal_data_) | 303 if (!personal_data_) |
301 return false; | 304 return false; |
302 return personal_data_->AccessAddressBook(); | 305 return personal_data_->AccessAddressBook(); |
303 } | 306 } |
304 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 307 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1221 return false; | 1224 return false; |
1222 | 1225 |
1223 // Disregard forms that we wouldn't ever autofill in the first place. | 1226 // Disregard forms that we wouldn't ever autofill in the first place. |
1224 if (!form.ShouldBeParsed()) | 1227 if (!form.ShouldBeParsed()) |
1225 return false; | 1228 return false; |
1226 | 1229 |
1227 return true; | 1230 return true; |
1228 } | 1231 } |
1229 | 1232 |
1230 } // namespace autofill | 1233 } // namespace autofill |
OLD | NEW |