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

Unified Diff: components/password_manager/core/browser/password_manager.cc

Issue 2609703002: Remove ScopedVector from autofill. (Closed)
Patch Set: drop the using 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/password_manager/core/browser/password_manager.cc
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index dc06e20c4e8d73bb9c0a8fd03124d6a5b86714f6..e7d265aad84150069b0afe6de476c0b66b5ebc41 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -829,19 +829,17 @@ void PasswordManager::ProcessAutofillPredictions(
for (const autofill::FormStructure* form : forms) {
if (logger)
logger->LogFormStructure(Logger::STRING_SERVER_PREDICTIONS, *form);
- for (std::vector<autofill::AutofillField*>::const_iterator field =
- form->begin();
- field != form->end(); ++field) {
+ for (const auto& field : *form) {
autofill::PasswordFormFieldPredictionType prediction_type;
- if (ServerTypeToPrediction((*field)->server_type(), &prediction_type)) {
- predictions[form->ToFormData()][*(*field)] = prediction_type;
+ if (ServerTypeToPrediction(field->server_type(), &prediction_type)) {
+ predictions[form->ToFormData()][*field] = prediction_type;
}
// Certain fields are annotated by the browsers as "not passwords" i.e.
// they should not be treated as passwords by the Password Manager.
- if ((*field)->form_control_type == "password" &&
+ if (field->form_control_type == "password" &&
IsPredictedTypeNotPasswordPrediction(
- (*field)->Type().GetStorableType())) {
- predictions[form->ToFormData()][*(*field)] =
+ field->Type().GetStorableType())) {
+ predictions[form->ToFormData()][*field] =
autofill::PREDICTION_NOT_PASSWORD;
}
}
« no previous file with comments | « components/password_manager/core/browser/password_generation_manager.cc ('k') | ios/chrome/browser/autofill/autofill_agent.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698