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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 2611453002: Remove ScopedVector from autofill::FormStructure (Closed)
Patch Set: Fix ios build Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index f8b7aa06ddd98f78fc6a20e87a9cff9cbab97a59..7cda51daaf99ff7885d5cd08847223df93587550 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -1123,7 +1123,7 @@ void AutofillManager::ImportFormData(const FormStructure& submitted_form) {
recently_autofilled_forms_.push_back(
std::map<std::string, base::string16>());
auto& map = recently_autofilled_forms_.back();
- for (const auto* field : submitted_form) {
+ for (const auto& field : submitted_form) {
AutofillType type = field->Type();
// Even though this is for development only, mask full credit card #'s.
if (type.GetStorableType() == CREDIT_CARD_NUMBER &&
@@ -1164,7 +1164,7 @@ void AutofillManager::ImportFormData(const FormStructure& submitted_form) {
// local save but we believe that sometimes offering upload and sometimes
// offering local save is a confusing user experience.
int cvc;
- for (const AutofillField* field : submitted_form) {
+ for (const auto& field : submitted_form) {
if (field->Type().GetStorableType() == CREDIT_CARD_VERIFICATION_CODE &&
base::StringToInt(field->value, &cvc)) {
upload_request_.cvc = field->value;
@@ -1680,9 +1680,9 @@ bool AutofillManager::GetCachedFormAndField(const FormData& form,
// Find the AutofillField that corresponds to |field|.
*autofill_field = NULL;
- for (AutofillField* current : **form_structure) {
+ for (const auto& current : **form_structure) {
if (current->SameFieldAs(field)) {
- *autofill_field = current;
+ *autofill_field = current.get();
break;
}
}
« no previous file with comments | « components/autofill/core/browser/autofill_download_manager_unittest.cc ('k') | components/autofill/core/browser/form_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698