Chromium Code Reviews| 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/form_structure.h" | 5 #include "components/autofill/core/browser/form_structure.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 | 261 |
| 262 if (autocomplete_attribute_value == "tel-local-suffix") | 262 if (autocomplete_attribute_value == "tel-local-suffix") |
| 263 return HTML_TYPE_TEL_LOCAL_SUFFIX; | 263 return HTML_TYPE_TEL_LOCAL_SUFFIX; |
| 264 | 264 |
| 265 if (autocomplete_attribute_value == "tel-extension") | 265 if (autocomplete_attribute_value == "tel-extension") |
| 266 return HTML_TYPE_TEL_EXTENSION; | 266 return HTML_TYPE_TEL_EXTENSION; |
| 267 | 267 |
| 268 if (autocomplete_attribute_value == "email") | 268 if (autocomplete_attribute_value == "email") |
| 269 return HTML_TYPE_EMAIL; | 269 return HTML_TYPE_EMAIL; |
| 270 | 270 |
| 271 if (autocomplete_attribute_value == "upi-vpa") { | |
| 272 // TODO(rogerm): Add UPI_VIRTUAL_PAYMENT_ADDRESS as an autofill type. | |
|
Mathieu
2017/03/23 11:26:22
TODO(crbug.com/xxxxxx) is the norm now (more tract
Mathieu
2017/03/23 11:26:22
nit: it would be HTML_TYPE_UPI...
Roger McFarlane (Chromium)
2017/03/28 19:08:23
Done.
Roger McFarlane (Chromium)
2017/03/28 19:08:24
Done.
| |
| 273 // Until then, fall through after logging the observation. | |
| 274 AutofillMetrics::LogExplicitUpiVpaHint(); | |
| 275 } | |
| 276 | |
| 271 return HTML_TYPE_UNRECOGNIZED; | 277 return HTML_TYPE_UNRECOGNIZED; |
| 272 } | 278 } |
| 273 | 279 |
| 274 std::ostream& operator<<( | 280 std::ostream& operator<<( |
| 275 std::ostream& out, | 281 std::ostream& out, |
| 276 const autofill::AutofillQueryResponseContents& response) { | 282 const autofill::AutofillQueryResponseContents& response) { |
| 277 out << "upload_required: " << response.upload_required(); | 283 out << "upload_required: " << response.upload_required(); |
| 278 for (const auto& field : response.field()) { | 284 for (const auto& field : response.field()) { |
| 279 out << "\nautofill_type: " << field.autofill_type(); | 285 out << "\nautofill_type: " << field.autofill_type(); |
| 280 } | 286 } |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1319 filtered_strings[0].at(prefix_len)) { | 1325 filtered_strings[0].at(prefix_len)) { |
| 1320 // Mismatch found. | 1326 // Mismatch found. |
| 1321 return filtered_strings[i].substr(0, prefix_len); | 1327 return filtered_strings[i].substr(0, prefix_len); |
| 1322 } | 1328 } |
| 1323 } | 1329 } |
| 1324 } | 1330 } |
| 1325 return filtered_strings[0]; | 1331 return filtered_strings[0]; |
| 1326 } | 1332 } |
| 1327 | 1333 |
| 1328 } // namespace autofill | 1334 } // namespace autofill |
| OLD | NEW |