PaymentHandler: Disable permission prompt for payment handler
As discussed in crrev.com/934741, we no longer want to show the
permission prompt.
Bug: 665949, 816980
Change-Id: I80f5bdae056df841d8edea797d8578aacfaf6015
Reviewed-on: https://chromium-review.googlesource.com/939882
Reviewed-by: Raymes Khoury <[email protected]>
Reviewed-by: Rouslan Solomakhin <[email protected]>
Commit-Queue: Jinho Bang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#540995}
diff --git a/chrome/browser/payments/payment_handler_permission_context.cc b/chrome/browser/payments/payment_handler_permission_context.cc
index 296aa57..f49bbef 100644
--- a/chrome/browser/payments/payment_handler_permission_context.cc
+++ b/chrome/browser/payments/payment_handler_permission_context.cc
@@ -4,8 +4,13 @@
#include "chrome/browser/payments/payment_handler_permission_context.h"
+#include "base/logging.h"
+#include "chrome/browser/permissions/permission_request_id.h"
+#include "chrome/browser/profiles/profile.h"
#include "components/content_settings/core/common/content_settings_types.h"
+#include "content/public/browser/web_contents.h"
#include "third_party/WebKit/public/mojom/feature_policy/feature_policy.mojom.h"
+#include "url/gurl.h"
namespace payments {
@@ -17,6 +22,17 @@
PaymentHandlerPermissionContext::~PaymentHandlerPermissionContext() {}
+void PaymentHandlerPermissionContext::DecidePermission(
+ content::WebContents* web_contents,
+ const PermissionRequestID& id,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ bool user_gesture,
+ const BrowserPermissionCallback& callback) {
+ // The user should never be prompted to authorize payment handler.
+ NOTREACHED();
+}
+
bool PaymentHandlerPermissionContext::IsRestrictedToSecureOrigins() const {
return true;
}