Index: content/browser/service_worker/service_worker_metrics.cc |
diff --git a/content/browser/service_worker/service_worker_metrics.cc b/content/browser/service_worker/service_worker_metrics.cc |
index d7c7533ba4e44a18343b1a8bae02344fd40a70c3..66cbe816b93e8e53707279ee8ff502e2a145cd02 100644 |
--- a/content/browser/service_worker/service_worker_metrics.cc |
+++ b/content/browser/service_worker/service_worker_metrics.cc |
@@ -80,6 +80,8 @@ std::string EventTypeToSuffix(ServiceWorkerMetrics::EventType event_type) { |
return "_NAVIGATION_HINT_LINK_TAP_DOWN"; |
case ServiceWorkerMetrics::EventType::EXTERNAL_REQUEST: |
return "_EXTERNAL_REQUEST"; |
+ case ServiceWorkerMetrics::EventType::PAYMENT_REQUEST: |
+ return "_PAYMENT_REQUEST"; |
case ServiceWorkerMetrics::EventType::NUM_TYPES: |
NOTREACHED() << static_cast<int>(event_type); |
} |
@@ -231,6 +233,8 @@ const char* ServiceWorkerMetrics::EventTypeToString(EventType event_type) { |
return "Navigation Hint Link Tap Down"; |
case EventType::EXTERNAL_REQUEST: |
return "External Request"; |
+ case EventType::PAYMENT_REQUEST: |
+ return "Payment Request"; |
case EventType::NUM_TYPES: |
break; |
} |
@@ -587,6 +591,10 @@ void ServiceWorkerMetrics::RecordEventDuration(EventType event, |
case EventType::EXTERNAL_REQUEST: |
UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.ExternalRequest.Time", time); |
break; |
+ case EventType::PAYMENT_REQUEST: |
+ UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.PaymentRequestEvent.Time", |
+ time); |
+ break; |
// Those navigation hints should not be sent as request events. |
case EventType::NAVIGATION_HINT_LINK_MOUSE_DOWN: |
case EventType::NAVIGATION_HINT_LINK_TAP_UNCONFIRMED: |