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

Unified Diff: chrome/browser/autofill/form_structure_browsertest.cc

Issue 2403773002: Remove stl_util's STLDeleteContainerPointers from autofill. (Closed)
Patch Set: rebase Created 4 years, 2 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: chrome/browser/autofill/form_structure_browsertest.cc
diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc
index 18ef3dc2ec0c076d994ebac74f9824e09321511f..fa8da27f04fc84f09d490ff5c5ed86f0ee05d0b3 100644
--- a/chrome/browser/autofill/form_structure_browsertest.cc
+++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -85,7 +85,8 @@ class FormStructureBrowserTest
void GenerateResults(const std::string& input, std::string* output) override;
// Serializes the given |forms| into a string.
- std::string FormStructuresToString(const std::vector<FormStructure*>& forms);
+ std::string FormStructuresToString(
+ const std::vector<std::unique_ptr<FormStructure>>& forms);
private:
DISALLOW_COPY_AND_ASSIGN(FormStructureBrowserTest);
@@ -111,14 +112,15 @@ void FormStructureBrowserTest::GenerateResults(const std::string& input,
ASSERT_NE(nullptr, autofill_driver);
AutofillManager* autofill_manager = autofill_driver->autofill_manager();
ASSERT_NE(nullptr, autofill_manager);
- std::vector<FormStructure*> forms = autofill_manager->form_structures_.get();
+ const std::vector<std::unique_ptr<FormStructure>>& forms =
+ autofill_manager->form_structures_;
*output = FormStructuresToString(forms);
}
std::string FormStructureBrowserTest::FormStructuresToString(
- const std::vector<FormStructure*>& forms) {
+ const std::vector<std::unique_ptr<FormStructure>>& forms) {
std::string forms_string;
- for (const FormStructure* form : forms) {
+ for (const auto& form : forms) {
for (const AutofillField* field : *form) {
forms_string += field->Type().ToString();
forms_string += " | " + base::UTF16ToUTF8(field->name);
« no previous file with comments | « android_webview/browser/aw_form_database_service.cc ('k') | chrome/browser/password_manager/password_store_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698