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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 } | 278 } |
279 | 279 |
280 void AutofillManager::ShowAutofillSettings() { | 280 void AutofillManager::ShowAutofillSettings() { |
281 client_->ShowAutofillSettings(); | 281 client_->ShowAutofillSettings(); |
282 } | 282 } |
283 | 283 |
284 #if defined(OS_MACOSX) && !defined(OS_IOS) | 284 #if defined(OS_MACOSX) && !defined(OS_IOS) |
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_ || !field.should_autocomplete) |
289 return false; | 289 return false; |
290 | |
Ilya Sherman
2014/08/28 18:40:49
We still shouldn't be showing these suggestions fo
erikchen
2014/08/28 20:57:34
Added the check.
| |
290 FormStructure* form_structure = NULL; | 291 FormStructure* form_structure = NULL; |
291 AutofillField* autofill_field = NULL; | 292 AutofillField* autofill_field = NULL; |
292 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) | 293 if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field)) |
293 return false; | 294 return false; |
294 | 295 |
295 return personal_data_->ShouldShowAccessAddressBookSuggestion( | 296 return personal_data_->ShouldShowAccessAddressBookSuggestion( |
296 autofill_field->Type()); | 297 autofill_field->Type()); |
297 } | 298 } |
298 | 299 |
299 bool AutofillManager::AccessAddressBook() { | 300 bool AutofillManager::AccessAddressBook() { |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1221 return false; | 1222 return false; |
1222 | 1223 |
1223 // Disregard forms that we wouldn't ever autofill in the first place. | 1224 // Disregard forms that we wouldn't ever autofill in the first place. |
1224 if (!form.ShouldBeParsed()) | 1225 if (!form.ShouldBeParsed()) |
1225 return false; | 1226 return false; |
1226 | 1227 |
1227 return true; | 1228 return true; |
1228 } | 1229 } |
1229 | 1230 |
1230 } // namespace autofill | 1231 } // namespace autofill |
OLD | NEW |