blob: 6a3dcc599eb5e5e4d62180638a6ce5cbecc55887 [file] [log] [blame]
Ayu Ishii9d303da52019-07-26 15:50:471// 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 Gu1c051ee2020-10-08 22:01:338#include "services/metrics/public/cpp/ukm_builders.h"
Ayu Ishiif035717c2019-11-26 19:33:369#include "third_party/blink/public/common/sms/sms_receiver_destroyed_reason.h"
10
Ayu Ishii9d303da52019-07-26 15:50:4711namespace base {
12class TimeDelta;
13}
14
15namespace content {
16
Ayu Ishiiae662c22019-08-06 16:24:0917// Records the time from when a call to the API was made to when an SMS has been
18// successfully received.
Yi Gu1c051ee2020-10-08 22:01:3319void RecordSmsReceiveTime(base::TimeDelta duration, ukm::SourceId source_id);
Ayu Ishiiae662c22019-08-06 16:24:0920
Ayu Ishii9d303da52019-07-26 15:50:4721// Records the time from when a successful SMS was retrieved to when the user
22// presses the Cancel button.
23void 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.
27void RecordContinueOnSuccessTime(base::TimeDelta duration);
28
Ayu Ishiif035717c2019-11-26 19:33:3629void RecordDestroyedReason(blink::SmsReceiverDestroyedReason reason);
30
Ayu Ishii9d303da52019-07-26 15:50:4731} // namespace content
32
33#endif // CONTENT_BROWSER_SMS_SMS_METRICS_H_