blob: 3ff21786464963b519fd46583b313780d2efdb05 [file] [log] [blame]
gayane8ff878072016-05-19 18:04:201// Copyright 2016 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 COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_
6#define COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_
7
8#include "base/time/time.h"
9
10namespace metrics {
11
Nate Fischer1a2d36f2019-10-08 05:19:2112// 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.
16base::TimeDelta GetUploadInterval(bool use_cellular_upload_interval);
gayane8ff878072016-05-19 18:04:2017
Nate Fischer1a2d36f2019-10-08 05:19:2118// Returns true if current connection type is cellular and the platform supports
19// using a separate interval for cellular connections (at the moment, this is
20// supported for OS_ANDROID and OS_IOS).
21bool ShouldUseCellularUploadInterval();
gayane8ff878072016-05-19 18:04:2022
23} // namespace metrics
24
25#endif // COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_