chromium/components/domain_reliability/scheduler.cc

// Copyright 2014 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/domain_reliability/scheduler.h"

#include <stdint.h>
#include <algorithm>
#include <memory>
#include <utility>

#include "base/metrics/field_trial.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "components/domain_reliability/config.h"
#include "components/domain_reliability/util.h"
#include "net/base/backoff_entry.h"

namespace {

const unsigned kInvalidCollectorIndex =;

const unsigned kDefaultMinimumUploadDelaySec =;
const unsigned kDefaultMaximumUploadDelaySec =;
const unsigned kDefaultUploadRetryIntervalSec =;

const char* kMinimumUploadDelayFieldTrialName =;
const char* kMaximumUploadDelayFieldTrialName =;
const char* kUploadRetryIntervalFieldTrialName =;

// Fixed elements of backoff policy
const double kMultiplyFactor =;
const double kJitterFactor =;
const int64_t kMaximumBackoffMs =;

unsigned GetUnsignedFieldTrialValueOrDefault(std::string field_trial_name,
                                             unsigned default_value) {}

}  // namespace

namespace domain_reliability {

// static
DomainReliabilityScheduler::Params
DomainReliabilityScheduler::Params::GetFromFieldTrialsOrDefaults() {}

DomainReliabilityScheduler::DomainReliabilityScheduler(
    const MockableTime* time,
    size_t num_collectors,
    const Params& params,
    const ScheduleUploadCallback& callback)
    :{}

DomainReliabilityScheduler::~DomainReliabilityScheduler() {}

void DomainReliabilityScheduler::OnBeaconAdded() {}

size_t DomainReliabilityScheduler::OnUploadStart() {}

void DomainReliabilityScheduler::OnUploadComplete(
    const DomainReliabilityUploader::UploadResult& result) {}

void DomainReliabilityScheduler::MakeDeterministicForTesting() {}

void DomainReliabilityScheduler::MaybeScheduleUpload() {}

// TODO(juliatuttle): Add min and max interval to config, use that instead.

// TODO(juliatuttle): Cap min and max intervals received from config.

void DomainReliabilityScheduler::GetNextUploadTimeAndCollector(
    base::TimeTicks now,
    base::TimeTicks* upload_time_out,
    size_t* collector_index_out) {}

}  // namespace domain_reliability