xref: /aosp_15_r20/external/cronet/components/metrics/net/cellular_logic_helper.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2016 The Chromium Authors
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 COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_
6 #define COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_
7 
8 #include "base/time/time.h"
9 
10 namespace metrics {
11 
12 // Returns UMA log upload interval based on OS. If
13 // |use_cellular_upload_interval| is true, this returns an interval suitable for
14 // metered cellular connections. Otherwise, this returns an interval suitable
15 // for unmetered (ex. WiFi) connections.
16 base::TimeDelta GetUploadInterval(bool use_cellular_upload_interval);
17 
18 // Returns true if current connection type is cellular and the platform supports
19 // using a separate interval for cellular connections (Android only).
20 bool ShouldUseCellularUploadInterval();
21 
22 }  // namespace metrics
23 
24 #endif  // COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_
25