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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.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/autofill/content/renderer/password_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index 0153ac5b4545b9f82c35e1cd5afe4ab3646c27f8..9357387c193aadb8c0313cc625cd3d776bb383f3 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -9,12 +9,12 @@
#include <memory>
#include <string>
#include <utility>
+#include <vector>
#include "base/bind.h"
#include "base/i18n/case_conversion.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ptr_util.h"
-#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_util.h"
@@ -1178,7 +1178,7 @@ void PasswordAutofillAgent::DidStartProvisionalLoad() {
*provisionally_saved_form_);
provisionally_saved_form_.reset();
} else {
- ScopedVector<PasswordForm> possible_submitted_forms;
+ std::vector<std::unique_ptr<PasswordForm>> possible_submitted_forms;
// Loop through the forms on the page looking for one that has been
// filled out. If one exists, try and save the credentials.
blink::WebVector<blink::WebFormElement> forms;
@@ -1201,7 +1201,7 @@ void PasswordAutofillAgent::DidStartProvisionalLoad() {
*render_frame()->GetWebFrame(), &field_value_and_properties_map_,
&form_predictions_));
- for (const PasswordForm* password_form : possible_submitted_forms) {
+ for (const auto& password_form : possible_submitted_forms) {
if (password_form && !password_form->username_value.empty() &&
FormContainsNonDefaultPasswordValue(*password_form)) {
password_forms_found = true;

Powered by Google App Engine
This is Rietveld 408576698