| 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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 std::vector<Suggestion> suggestions = | 1387 std::vector<Suggestion> suggestions = |
| 1388 personal_data_->GetCreditCardSuggestions(type, field.value); | 1388 personal_data_->GetCreditCardSuggestions(type, field.value); |
| 1389 for (size_t i = 0; i < suggestions.size(); i++) { | 1389 for (size_t i = 0; i < suggestions.size(); i++) { |
| 1390 suggestions[i].frontend_id = | 1390 suggestions[i].frontend_id = |
| 1391 MakeFrontendID(suggestions[i].backend_id, std::string()); | 1391 MakeFrontendID(suggestions[i].backend_id, std::string()); |
| 1392 } | 1392 } |
| 1393 return suggestions; | 1393 return suggestions; |
| 1394 } | 1394 } |
| 1395 | 1395 |
| 1396 void AutofillManager::ParseForms(const std::vector<FormData>& forms) { | 1396 void AutofillManager::ParseForms(const std::vector<FormData>& forms) { |
| 1397 if (forms.empty()) |
| 1398 return; |
| 1399 |
| 1397 std::vector<FormStructure*> non_queryable_forms; | 1400 std::vector<FormStructure*> non_queryable_forms; |
| 1398 for (const FormData& form : forms) { | 1401 for (const FormData& form : forms) { |
| 1399 scoped_ptr<FormStructure> form_structure(new FormStructure(form)); | 1402 scoped_ptr<FormStructure> form_structure(new FormStructure(form)); |
| 1400 | 1403 |
| 1401 if (!form_structure->ShouldBeParsed()) { | 1404 if (!form_structure->ShouldBeParsed()) { |
| 1402 if (form_structure->has_password_field()) { | 1405 if (form_structure->has_password_field()) { |
| 1403 AutofillMetrics::LogPasswordFormQueryVolume( | 1406 AutofillMetrics::LogPasswordFormQueryVolume( |
| 1404 AutofillMetrics::NEW_PASSWORD_QUERY); | 1407 AutofillMetrics::NEW_PASSWORD_QUERY); |
| 1405 } | 1408 } |
| 1406 continue; | 1409 continue; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1557 if (i > 0) | 1560 if (i > 0) |
| 1558 fputs("Next oldest form:\n", file); | 1561 fputs("Next oldest form:\n", file); |
| 1559 } | 1562 } |
| 1560 fputs("\n", file); | 1563 fputs("\n", file); |
| 1561 | 1564 |
| 1562 fclose(file); | 1565 fclose(file); |
| 1563 } | 1566 } |
| 1564 #endif // ENABLE_FORM_DEBUG_DUMP | 1567 #endif // ENABLE_FORM_DEBUG_DUMP |
| 1565 | 1568 |
| 1566 } // namespace autofill | 1569 } // namespace autofill |
| OLD | NEW |