1 // Copyright 2018 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_COMMAND_LINE_CONFIG_POLICY_H_
6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_COMMAND_LINE_CONFIG_POLICY_H_
8 #include "base/time/time.h"
9 #include "components/update_client/command_line_config_policy.h"
16 namespace component_updater {
18 extern const char kSwitchTestRequestParam[];
20 // Component updater config policy implementation.
21 class ComponentUpdaterCommandLineConfigPolicy final
22 : public update_client::CommandLineConfigPolicy {
24 explicit ComponentUpdaterCommandLineConfigPolicy(
25 const base::CommandLine* cmdline);
27 ComponentUpdaterCommandLineConfigPolicy(
28 const ComponentUpdaterCommandLineConfigPolicy&) = delete;
29 ComponentUpdaterCommandLineConfigPolicy& operator=(
30 const ComponentUpdaterCommandLineConfigPolicy&) = delete;
32 // update_client::CommandLineConfigPolicy overrides.
33 bool BackgroundDownloadsEnabled() const override;
34 bool DeltaUpdatesEnabled() const override;
35 bool FastUpdate() const override;
36 bool PingsEnabled() const override;
37 bool TestRequest() const override;
38 GURL UrlSourceOverride() const override;
39 base::TimeDelta InitialDelay() const override;
42 bool background_downloads_enabled_ = false;
43 bool deltas_enabled_ = true;
44 bool fast_update_ = false;
45 bool pings_enabled_ = true;
46 bool test_request_ = false;
48 // If non-zero, time interval until the first component update check.
49 base::TimeDelta initial_delay_ = base::Seconds(0);
51 GURL url_source_override_;
54 } // namespace component_updater
56 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_COMMAND_LINE_CONFIG_POLICY_H_