chromium/components/metrics/metrics_upload_scheduler.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/metrics/metrics_upload_scheduler.h"

#include <stdint.h>

#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "build/build_config.h"
#include "components/metrics/metrics_scheduler.h"

namespace metrics {
namespace {

// When uploading metrics to the server fails, we progressively wait longer and
// longer before sending the next log. This backoff process helps reduce load
// on a server that is having issues.
// The following is the multiplier we use to expand that inter-log duration.
const double kBackoffMultiplier =;

// The maximum backoff interval in hours.
const int kMaxBackoffIntervalHours =;

// Minutes to wait if we are unable to upload due to data usage cap.
const int kOverDataUsageIntervalMinutes =;

// Increases the upload interval each time it's called, to handle the case
// where the server is having issues.
base::TimeDelta BackOffUploadInterval(base::TimeDelta interval) {}

}  // namespace

MetricsUploadScheduler::MetricsUploadScheduler(
    const base::RepeatingClosure& upload_callback,
    bool fast_startup_for_testing)
    :{}

MetricsUploadScheduler::~MetricsUploadScheduler() = default;

// static
base::TimeDelta MetricsUploadScheduler::GetUnsentLogsInterval() {}

// static
base::TimeDelta MetricsUploadScheduler::GetInitialBackoffInterval() {}

void MetricsUploadScheduler::UploadFinished(bool server_is_healthy) {}

void MetricsUploadScheduler::StopAndUploadCancelled() {}

void MetricsUploadScheduler::UploadOverDataUsageCap() {}

}  // namespace metrics