cellular_logic_helper.h 976 B

12345678910111213141516171819202122232425
  1. // 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. #ifndef COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_
  5. #define COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_
  6. #include "base/time/time.h"
  7. namespace metrics {
  8. // Returns UMA log upload interval based on OS. If
  9. // |use_cellular_upload_interval| is true, this returns an interval suitable for
  10. // metered cellular connections. Otherwise, this returns an interval suitable
  11. // for unmetered (ex. WiFi) connections.
  12. base::TimeDelta GetUploadInterval(bool use_cellular_upload_interval);
  13. // Returns true if current connection type is cellular and the platform supports
  14. // using a separate interval for cellular connections (at the moment, this is
  15. // supported for OS_ANDROID and OS_IOS).
  16. bool ShouldUseCellularUploadInterval();
  17. } // namespace metrics
  18. #endif // COMPONENTS_METRICS_NET_CELLULAR_LOGIC_HELPER_H_