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

Unified Diff: ios/chrome/browser/payments/payment_request.mm

Issue 2945803002: Use ContainsValue() instead of std::find() in ios/ (Closed)
Patch Set: Fixed compilation error. Created 3 years, 6 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: ios/chrome/browser/payments/payment_request.mm
diff --git a/ios/chrome/browser/payments/payment_request.mm b/ios/chrome/browser/payments/payment_request.mm
index 2f6bc47798872572c56d91bfe157b1087f16b86f..5442279e122d7a100cd5bdbb5d8e2e2c29b93143 100644
--- a/ios/chrome/browser/payments/payment_request.mm
+++ b/ios/chrome/browser/payments/payment_request.mm
@@ -6,6 +6,7 @@
#include "base/containers/adapters.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_data_util.h"
#include "components/autofill/core/browser/autofill_profile.h"
@@ -207,9 +208,7 @@ void PaymentRequest::PopulateCreditCardCache() {
std::string spec_issuer_network =
autofill::data_util::GetPaymentRequestData(credit_card->network())
.basic_card_issuer_network;
- if (std::find(supported_card_networks_.begin(),
- supported_card_networks_.end(),
- spec_issuer_network) != supported_card_networks_.end()) {
+ if (base::ContainsValue(supported_card_networks_, spec_issuer_network)) {
credit_card_cache_.push_back(
base::MakeUnique<autofill::CreditCard>(*credit_card));
}
« no previous file with comments | « ios/chrome/browser/passwords/password_generation_agent.mm ('k') | ios/chrome/browser/reading_list/url_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698