[Payments] canMakePayment() in incognito mode.

Before this patch, a canMakePayment() check for payment apps returned
'true' on desktop and iOS in incognito mode, even though payment apps
are not supported on these platforms yet.

    new PaymentRequest('https://bobpay.com').canMakePayment()

The same canMakePayment() check in non-incognito mode returns 'false'.
To preserve user privacy better, the canMakePayment() check should
return 'false' in incognito mode as well.

This patch changes the return value from canMakePayment() in incognito
mode such that, if only payment apps are requested and the payment app
feature is not available, then canMakePayment() returns 'false'.

After this patch, the canMakePayment() check for payment apps on desktop
and iOS returns 'false'.

Bug: 770303
Change-Id: I86e8089790fa83764eec0ae120e39559724a5118
Reviewed-on: https://chromium-review.googlesource.com/693079
Reviewed-by: Moe Ahmadi <[email protected]>
Reviewed-by: anthonyvd <[email protected]>
Commit-Queue: Rouslan Solomakhin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#506029}
diff --git a/components/payments/content/payment_request.h b/components/payments/content/payment_request.h
index a43ee8e..83f9f70c 100644
--- a/components/payments/content/payment_request.h
+++ b/components/payments/content/payment_request.h
@@ -106,9 +106,15 @@
   // the first one being the most precise.
   void RecordFirstAbortReason(JourneyLogger::AbortReason completion_status);
 
-  // The PaymentRequestState::CanMakePaymentCallback.
+  // The PaymentRequestState::CanMakePaymentCallback. Checks for incognito mode
+  // and query quota and so may send QUERY_QUOTA_EXCEEDED.
   void CanMakePaymentCallback(bool can_make_payment);
 
+  // Sends either CAN_MAKE_PAYMENT or CANNOT_MAKE_PAYMENT to the renderer,
+  // depending on |can_make_payment| value. Never sends QUERY_QUOTA_EXCEEDED.
+  // Does not check quota or incognito mode.
+  void RespondToCanMakePaymentQuery(bool can_make_payment);
+
   content::WebContents* web_contents_;
   std::unique_ptr<PaymentRequestDelegate> delegate_;
   // |manager_| owns this PaymentRequest.