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

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

Issue 2349033002: Include addresses with the getdetailsforsavecard Payments RPC. (Closed)
Patch Set: Add tests to verify whether or not address names are sent. Created 4 years, 3 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.h
diff --git a/components/autofill/core/browser/payments/payments_client.h b/components/autofill/core/browser/payments/payments_client.h
index 2af8bb7b7cf8828cc3ce400cf5f9810e9b4657e4..dcb22b07841e8614a21c9da9e496b8ca4e195354 100644
--- a/components/autofill/core/browser/payments/payments_client.h
+++ b/components/autofill/core/browser/payments/payments_client.h
@@ -58,6 +58,11 @@ class PaymentsClientDelegate {
class PaymentsClient : public net::URLFetcherDelegate,
public OAuth2TokenService::Consumer {
public:
+ // The name of the field used to send names as part of an address. Used in the
+ // implementation and in tests which verify that this value is set or not at
+ // appropriate times.
+ static const std::string kRecipientName;
+
// A collection of the information required to make a credit card unmask
// request.
struct UnmaskRequestDetails {
@@ -103,9 +108,11 @@ class PaymentsClient : public net::URLFetcherDelegate,
void UnmaskCard(const UnmaskRequestDetails& request_details);
// Determine if the user meets the Payments service's conditions for upload.
- // If so, the required legal message for display will be returned via
- // OnDidGetUploadDetails.
- virtual void GetUploadDetails(const std::string& app_locale);
+ // The service uses |addresses| (from which names are removed) and
+ // |app_locale| to determine which legal message to display. If the conditions
+ // are met, the legal message will be returned via OnDidGetUploadDetails.
+ virtual void GetUploadDetails(const std::vector<AutofillProfile>& addresses,
+ const std::string& app_locale);
// The user has indicated that they would like to upload a card with the given
// cvc. This request will fail server-side if a successful call to

Powered by Google App Engine
This is Rietveld 408576698