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

Unified Diff: components/autofill/core/browser/payments/payments_client.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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/payments/payments_client.cc
diff --git a/components/autofill/core/browser/payments/payments_client.cc b/components/autofill/core/browser/payments/payments_client.cc
index 7c7d75b3ce302c54de0a3948ce2d318d088f0bbe..b34ad10a996fd51eb440a591320f2e2ca37fee4f 100644
--- a/components/autofill/core/browser/payments/payments_client.cc
+++ b/components/autofill/core/browser/payments/payments_client.cc
@@ -171,7 +171,7 @@ class UnmaskCardRequest : public PaymentsRequest {
request_dict.SetString("credit_card_id", request_details_.card.server_id());
request_dict.Set("risk_data_encoded",
BuildRiskDictionary(request_details_.risk_data));
- request_dict.Set("context", base::WrapUnique(new base::DictionaryValue()));
+ request_dict.Set("context", base::MakeUnique<base::DictionaryValue>());
int value = 0;
if (base::StringToInt(request_details_.user_response.exp_month, &value))
@@ -357,17 +357,16 @@ void PaymentsClient::Prepare() {
void PaymentsClient::UnmaskCard(
const PaymentsClient::UnmaskRequestDetails& request_details) {
- IssueRequest(base::WrapUnique(new UnmaskCardRequest(request_details)), true);
+ IssueRequest(base::MakeUnique<UnmaskCardRequest>(request_details), true);
}
void PaymentsClient::GetUploadDetails(const std::string& app_locale) {
- IssueRequest(base::WrapUnique(new GetUploadDetailsRequest(app_locale)),
- false);
+ IssueRequest(base::MakeUnique<GetUploadDetailsRequest>(app_locale), false);
}
void PaymentsClient::UploadCard(
const PaymentsClient::UploadRequestDetails& request_details) {
- IssueRequest(base::WrapUnique(new UploadCardRequest(request_details)), true);
+ IssueRequest(base::MakeUnique<UploadCardRequest>(request_details), true);
}
void PaymentsClient::IssueRequest(std::unique_ptr<PaymentsRequest> request,

Powered by Google App Engine
This is Rietveld 408576698