Ayu Ishii | 9d303da5 | 2019-07-26 15:50:47 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CONTENT_BROWSER_SMS_SMS_METRICS_H_ |
| 6 | #define CONTENT_BROWSER_SMS_SMS_METRICS_H_ |
| 7 | |
Yi Gu | 1c051ee | 2020-10-08 22:01:33 | [diff] [blame^] | 8 | #include "services/metrics/public/cpp/ukm_builders.h" |
Ayu Ishii | f035717c | 2019-11-26 19:33:36 | [diff] [blame] | 9 | #include "third_party/blink/public/common/sms/sms_receiver_destroyed_reason.h" |
| 10 | |
Ayu Ishii | 9d303da5 | 2019-07-26 15:50:47 | [diff] [blame] | 11 | namespace base { |
| 12 | class TimeDelta; |
| 13 | } |
| 14 | |
| 15 | namespace content { |
| 16 | |
Ayu Ishii | ae662c2 | 2019-08-06 16:24:09 | [diff] [blame] | 17 | // Records the time from when a call to the API was made to when an SMS has been |
| 18 | // successfully received. |
Yi Gu | 1c051ee | 2020-10-08 22:01:33 | [diff] [blame^] | 19 | void RecordSmsReceiveTime(base::TimeDelta duration, ukm::SourceId source_id); |
Ayu Ishii | ae662c2 | 2019-08-06 16:24:09 | [diff] [blame] | 20 | |
Ayu Ishii | 9d303da5 | 2019-07-26 15:50:47 | [diff] [blame] | 21 | // Records the time from when a successful SMS was retrieved to when the user |
| 22 | // presses the Cancel button. |
| 23 | void RecordCancelOnSuccessTime(base::TimeDelta duration); |
| 24 | |
| 25 | // Records the time from when a successful SMS was retrieved to when the user |
| 26 | // presses the Continue button. |
| 27 | void RecordContinueOnSuccessTime(base::TimeDelta duration); |
| 28 | |
Ayu Ishii | f035717c | 2019-11-26 19:33:36 | [diff] [blame] | 29 | void RecordDestroyedReason(blink::SmsReceiverDestroyedReason reason); |
| 30 | |
Ayu Ishii | 9d303da5 | 2019-07-26 15:50:47 | [diff] [blame] | 31 | } // namespace content |
| 32 | |
| 33 | #endif // CONTENT_BROWSER_SMS_SMS_METRICS_H_ |