chromium/components/component_updater/component_updater_command_line_config_policy.cc

// Copyright 2018 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/component_updater/component_updater_command_line_config_policy.h"

#include <string>
#include <vector>

#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/sys_string_conversions.h"
#include "build/build_config.h"
#include "components/component_updater/component_updater_switches.h"

namespace component_updater {

namespace {

// Debug values you can pass to --component-updater=value1,value2. Do not
// use these values in production code.

// Speed up the initial component checking.
const char kSwitchFastUpdate[] =;

// Disables pings. Pings are the requests sent to the update server that report
// the success or the failure of component install or update attempts.
const char kSwitchDisablePings[] =;

// Sets the URL for updates.
const char kSwitchUrlSource[] =;

// Disables differential updates.
const char kSwitchDisableDeltaUpdates[] =;

// Configures the initial delay before the first component update check. The
// value is in seconds.
const char kInitialDelay[] =;

#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
// Disables background downloads.
const char kSwitchDisableBackgroundDownloads[] = "disable-background-downloads";
#endif  // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)

// If there is an element of |vec| of the form |test|=.*, returns the right-
// hand side of that assignment. Otherwise, returns an empty string.
// The right-hand side may contain additional '=' characters, allowing for
// further nesting of switch arguments.
std::string GetSwitchArgument(const std::vector<std::string>& vec,
                              const char* test) {}

}  // namespace

// Add "testrequest=1" attribute to the update check request.
const char kSwitchTestRequestParam[] =;

ComponentUpdaterCommandLineConfigPolicy::
    ComponentUpdaterCommandLineConfigPolicy(const base::CommandLine* cmdline) {}

bool ComponentUpdaterCommandLineConfigPolicy::BackgroundDownloadsEnabled()
    const {}

bool ComponentUpdaterCommandLineConfigPolicy::DeltaUpdatesEnabled() const {}

bool ComponentUpdaterCommandLineConfigPolicy::FastUpdate() const {}

bool ComponentUpdaterCommandLineConfigPolicy::PingsEnabled() const {}

bool ComponentUpdaterCommandLineConfigPolicy::TestRequest() const {}

GURL ComponentUpdaterCommandLineConfigPolicy::UrlSourceOverride() const {}

base::TimeDelta ComponentUpdaterCommandLineConfigPolicy::InitialDelay() const {}

}  // namespace component_updater