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

Unified Diff: components/payments/content/payment_request_spec.cc

Issue 2815763002: Prevent usage of web payments API over insecure HTTPS. (Closed)
Patch Set: Self-review Created 3 years, 8 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/payments/content/payment_request_spec.cc
diff --git a/components/payments/content/payment_request_spec.cc b/components/payments/content/payment_request_spec.cc
index 6fbfc5f63cd187569f5ef4135a29797cf38fe317..5e58552f51e8866cd314d3ba6188a7bf8e2c64d1 100644
--- a/components/payments/content/payment_request_spec.cc
+++ b/components/payments/content/payment_request_spec.cc
@@ -136,12 +136,6 @@ void PaymentRequestSpec::StartWaitingForUpdateWith(
void PaymentRequestSpec::PopulateValidatedMethodData(
const std::vector<mojom::PaymentMethodDataPtr>& method_data_mojom) {
- if (method_data_mojom.empty()) {
- LOG(ERROR) << "Invalid payment methods or data";
- NotifyOnInvalidSpecProvided();
- return;
- }
-
std::vector<PaymentMethodData> method_data_vector;
method_data_vector.reserve(method_data_mojom.size());
for (const mojom::PaymentMethodDataPtr& method_data_entry :
@@ -161,13 +155,9 @@ void PaymentRequestSpec::PopulateValidatedMethodData(
method_data_vector.push_back(std::move(method_data));
}
- if (!data_util::ParseBasicCardSupportedNetworks(
- method_data_vector, &supported_card_networks_,
- &basic_card_specified_networks_)) {
- LOG(ERROR) << "Invalid payment methods or data";
- NotifyOnInvalidSpecProvided();
- return;
- }
+ data_util::ParseBasicCardSupportedNetworks(method_data_vector,
+ &supported_card_networks_,
+ &basic_card_specified_networks_);
supported_card_networks_set_.insert(supported_card_networks_.begin(),
supported_card_networks_.end());
}
@@ -192,13 +182,6 @@ void PaymentRequestSpec::UpdateSelectedShippingOption() {
}
}
-void PaymentRequestSpec::NotifyOnInvalidSpecProvided() {
- for (auto& observer : observers_)
- observer.OnInvalidSpecProvided();
- if (observer_for_testing_)
- observer_for_testing_->OnInvalidSpecProvided();
-}
-
void PaymentRequestSpec::NotifyOnSpecUpdated() {
for (auto& observer : observers_)
observer.OnSpecUpdated();

Powered by Google App Engine
This is Rietveld 408576698