chromium/components/download/internal/background_service/config.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/download/internal/background_service/config.h"

#include <string>

#include "base/metrics/field_trial_params.h"
#include "base/numerics/clamped_math.h"
#include "base/strings/string_number_conversions.h"
#include "build/build_config.h"
#include "components/download/public/background_service/features.h"

namespace download {

namespace {

// Default value for battery query interval.
const base::TimeDelta kDefaultBatteryQueryInterval =;

// Default minimum battery percentage to start download or background task when
// battery requirement is sensitive.
const uint32_t kDefaultDownloadBatteryPercentage =;

// Default value for max concurrent downloads configuration.
const uint32_t kDefaultMaxConcurrentDownloads =;

// Default value for maximum running downloads of the download service.
const uint32_t kDefaultMaxRunningDownloads =;

// Default value for maximum scheduled downloads.
const uint32_t kDefaultMaxScheduledDownloads =;

// Default value for maximum retry count.
const uint32_t kDefaultMaxRetryCount =;

// Default value for maximum resumption count.
const uint32_t kDefaultMaxResumptionCount =;

// Default value for file keep alive time, keep the file alive for 12 hours by
// default.
const base::TimeDelta kDefaultFileKeepAliveTime =;

// Default value for maximum duration that the file can be kept alive time,
// default is 7 days.
const base::TimeDelta kDefaultMaxFileKeepAliveTime =;

// Default value for file cleanup window, the system will schedule a cleanup
// task within this window.
const base::TimeDelta kDefaultFileCleanupWindow =;

// Default value for the start window time for OS to schedule background task.
const base::TimeDelta kDefaultWindowStartTime =;

// Default value for the end window time for OS to schedule background task.
const base::TimeDelta kDefaultWindowEndTime =;

// Default value for start up delay to wait for network stack ready.
const base::TimeDelta kDefaultNetworkStartupDelay =;

// Default value for start up delay to wait for network stack ready when
// triggered from a background task.
const base::TimeDelta kDefaultNetworkStartupDelayBackgroundTask =;

// The default delay to notify the observer when network changes from
// disconnected to connected.
const base::TimeDelta kDefaultNetworkChangeDelay =;

// The default delay to notify the observer after a navigation completes.
const base::TimeDelta kDefaultNavigationCompletionDelay =;

// The default timeout for a navigation.
const base::TimeDelta kDefaultNavigationTimeoutDelay =;

// The default timeout for a pending upload.
const base::TimeDelta kDefaultPendingUploadTimeoutDelay =;

// The default value of download retry delay when the download is failed.
const base::TimeDelta kDefaultDownloadRetryDelay =;

// Helper routine to get Finch experiment parameter. If no Finch seed was found,
// use the |default_value|. The |name| should match an experiment
// parameter in Finch server configuration.
uint32_t GetFinchConfigUInt(const std::string& name, uint32_t default_value) {}

}  // namespace

// static
std::unique_ptr<Configuration> Configuration::CreateFromFinch() {}

Configuration::Configuration()
    :{}

}  // namespace download