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

Unified Diff: chrome/browser/permissions/permission_infobar_delegate.cc

Issue 2946013002: PaymentHandler: Implement requestPermission().
Patch Set: PaymentHandler: Implement requestPermission(). Created 3 years, 6 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: chrome/browser/permissions/permission_infobar_delegate.cc
diff --git a/chrome/browser/permissions/permission_infobar_delegate.cc b/chrome/browser/permissions/permission_infobar_delegate.cc
index b3eea783d7e292364aeb0d74763980c2d450c4a2..6a75dff33079ad28bdaa09ada63bcfed501420c9 100644
--- a/chrome/browser/permissions/permission_infobar_delegate.cc
+++ b/chrome/browser/permissions/permission_infobar_delegate.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/media/midi_permission_infobar_delegate_android.h"
#include "chrome/browser/media/protected_media_identifier_infobar_delegate_android.h"
#include "chrome/browser/notifications/notification_permission_infobar_delegate.h"
+#include "chrome/browser/payments/payment_handler_permission_infobar_delegate.h"
#include "chrome/browser/permissions/permission_decision_auto_blocker.h"
#include "chrome/browser/permissions/permission_request.h"
#include "chrome/browser/permissions/permission_uma_util.h"
@@ -50,22 +51,22 @@ PermissionInfoBarDelegate::CreateDelegate(
const PermissionSetCallback& callback) {
switch (type) {
case CONTENT_SETTINGS_TYPE_GEOLOCATION:
- return std::unique_ptr<PermissionInfoBarDelegate>(
- new GeolocationInfoBarDelegateAndroid(
- requesting_frame, user_gesture, profile, callback));
+ return base::MakeUnique<GeolocationInfoBarDelegateAndroid>(
+ requesting_frame, user_gesture, profile, callback);
case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING:
- return std::unique_ptr<PermissionInfoBarDelegate>(
- new NotificationPermissionInfoBarDelegate(
- type, requesting_frame, user_gesture, profile, callback));
+ return base
+ : MakeUnique<NotificationPermissionInfoBarDelegate>(
+ type, requesting_frame, user_gesture, profile, callback);
case CONTENT_SETTINGS_TYPE_MIDI_SYSEX:
- return std::unique_ptr<PermissionInfoBarDelegate>(
- new MidiPermissionInfoBarDelegateAndroid(
- requesting_frame, user_gesture, profile, callback));
+ return base : MakeUnique<MidiPermissionInfoBarDelegateAndroid>(
+ requesting_frame, user_gesture, profile, callback);
case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER:
- return std::unique_ptr<PermissionInfoBarDelegate>(
- new ProtectedMediaIdentifierInfoBarDelegateAndroid(
- requesting_frame, user_gesture, profile, callback));
+ return base : MakeUnique<ProtectedMediaIdentifierInfoBarDelegateAndroid>(
+ requesting_frame, user_gesture, profile, callback);
+ case CONTENT_SETTINGS_TYPE_PAYMENT_HANDLER:
+ return base : MakeUnique<PaymentHandlerPermissionInfoBarDelegate>(
+ requesting_frame, user_gesture, profile, callback);
default:
NOTREACHED();
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698