Commit 31885d17 authored by gogerald's avatar gogerald Committed by Commit Bot

[Payments] Implement ServiceWorkerPaymentInstrument::IsValidForModifier

Bug: 762668
Change-Id: I46f083b9bc6cf304a7d47b9ba974f2e49e85111e
Reviewed-on: https://chromium-review.googlesource.com/672668Reviewed-by: default avatarMathieu Perreault <mathp@chromium.org>
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502955}
parent 77cdaac7
......@@ -4,6 +4,7 @@
#include "components/payments/content/service_worker_payment_instrument.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/payment_app_provider.h"
......@@ -141,7 +142,12 @@ bool ServiceWorkerPaymentInstrument::IsValidForModifier(
const std::vector<std::string>& supported_networks,
const std::set<autofill::CreditCard::CardType>& supported_types,
bool supported_types_specified) const {
NOTIMPLEMENTED();
for (const auto& modifier_supported_method : method) {
if (base::ContainsValue(stored_payment_app_info_->enabled_methods,
modifier_supported_method)) {
return true;
}
}
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment