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

Unified Diff: components/autofill/core/browser/test_personal_data_manager.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: components/autofill/core/browser/test_personal_data_manager.cc
diff --git a/components/autofill/core/browser/test_personal_data_manager.cc b/components/autofill/core/browser/test_personal_data_manager.cc
index cfc28b415766d7a5ccaf9dc917c103edebafe427..1463fdbec48928a97a1d8784c7d6b9181acba8c4 100644
--- a/components/autofill/core/browser/test_personal_data_manager.cc
+++ b/components/autofill/core/browser/test_personal_data_manager.cc
@@ -4,6 +4,7 @@
#include "components/autofill/core/browser/test_personal_data_manager.h"
+#include "base/memory/ptr_util.h"
#include "components/autofill/core/browser/personal_data_manager_observer.h"
namespace autofill {
@@ -29,7 +30,7 @@ void TestPersonalDataManager::AddTestingCreditCard(CreditCard* credit_card) {
void TestPersonalDataManager::AddTestingServerCreditCard(
const CreditCard& credit_card) {
- server_credit_cards_.push_back(new CreditCard(credit_card));
+ server_credit_cards_.push_back(base::MakeUnique<CreditCard>(credit_card));
}
const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles()
@@ -37,13 +38,12 @@ const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles()
return profiles_;
}
-const std::vector<AutofillProfile*>& TestPersonalDataManager::web_profiles()
- const {
+std::vector<AutofillProfile*> TestPersonalDataManager::web_profiles() const {
return profiles_;
}
-const std::vector<CreditCard*>& TestPersonalDataManager::
- GetCreditCards() const {
+const std::vector<CreditCard*>& TestPersonalDataManager::GetCreditCards()
+ const {
return credit_cards_;
}

Powered by Google App Engine
This is Rietveld 408576698