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

Side by Side Diff: components/payments/content/payment_request_state.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_
6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 PaymentRequestDelegate* payment_request_delegate); 75 PaymentRequestDelegate* payment_request_delegate);
76 ~PaymentRequestState() override; 76 ~PaymentRequestState() override;
77 77
78 // PaymentResponseHelper::Delegate 78 // PaymentResponseHelper::Delegate
79 void OnPaymentResponseReady( 79 void OnPaymentResponseReady(
80 mojom::PaymentResponsePtr payment_response) override; 80 mojom::PaymentResponsePtr payment_response) override;
81 81
82 // Returns whether the user has at least one instrument that satisfies the 82 // Returns whether the user has at least one instrument that satisfies the
83 // specified supported payment methods. 83 // specified supported payment methods.
84 bool CanMakePayment() const; 84 bool CanMakePayment() const;
85
86 // Returns true if the payment methods that the merchant website have
87 // requested are supported. For example, may return true for "basic-card", but
88 // false for "https://bobpay.com".
89 bool AreRequestedMethodsSupported() const;
90
85 void AddObserver(Observer* observer); 91 void AddObserver(Observer* observer);
86 void RemoveObserver(Observer* observer); 92 void RemoveObserver(Observer* observer);
87 93
88 // Initiates the generation of the PaymentResponse. Callers should check 94 // Initiates the generation of the PaymentResponse. Callers should check
89 // |is_ready_to_pay|, which is inexpensive. 95 // |is_ready_to_pay|, which is inexpensive.
90 void GeneratePaymentResponse(); 96 void GeneratePaymentResponse();
91 97
92 // Gets the Autofill Profile representing the shipping address or contact 98 // Gets the Autofill Profile representing the shipping address or contact
93 // information currently selected for this PaymentRequest flow. Can return 99 // information currently selected for this PaymentRequest flow. Can return
94 // null. 100 // null.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 std::unique_ptr<PaymentResponseHelper> response_helper_; 198 std::unique_ptr<PaymentResponseHelper> response_helper_;
193 199
194 base::ObserverList<Observer> observers_; 200 base::ObserverList<Observer> observers_;
195 201
196 DISALLOW_COPY_AND_ASSIGN(PaymentRequestState); 202 DISALLOW_COPY_AND_ASSIGN(PaymentRequestState);
197 }; 203 };
198 204
199 } // namespace payments 205 } // namespace payments
200 206
201 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ 207 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698