command_line_switches.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_SYNC_BASE_COMMAND_LINE_SWITCHES_H_
  5. #define COMPONENTS_SYNC_BASE_COMMAND_LINE_SWITCHES_H_
  6. namespace syncer {
  7. // Disables syncing browser data to a Google Account.
  8. inline constexpr char kDisableSync[] = "disable-sync";
  9. // Allows overriding the deferred init fallback timeout.
  10. inline constexpr char kSyncDeferredStartupTimeoutSeconds[] =
  11. "sync-deferred-startup-timeout-seconds";
  12. // Controls whether the initial state of the "Capture Specifics" flag on
  13. // chrome://sync-internals is enabled.
  14. inline constexpr char kSyncIncludeSpecificsInProtocolLog[] =
  15. "sync-include-specifics";
  16. // Controls the number of ProtocolEvents that are buffered, and thus can be
  17. // displayed on newly-opened chrome://sync-internals tabs.
  18. inline constexpr char kSyncProtocolLogBufferSize[] =
  19. "sync-protocol-log-buffer-size";
  20. // Overrides the default server used for profile sync.
  21. inline constexpr char kSyncServiceURL[] = "sync-url";
  22. // This flag causes sync to retry very quickly (see polling_constants.h) the
  23. // when it encounters an error, as the first step towards exponential backoff.
  24. inline constexpr char kSyncShortInitialRetryOverride[] =
  25. "sync-short-initial-retry-override";
  26. // This flag significantly shortens the delay between nudge cycles. Its primary
  27. // purpose is to speed up integration tests. The normal delay allows coalescing
  28. // and prevention of server overload, so don't use this unless you're really
  29. // sure that it's what you want.
  30. inline constexpr char kSyncShortNudgeDelayForTest[] =
  31. "sync-short-nudge-delay-for-test";
  32. // Specifies the vault server used for trusted vault passphrase.
  33. inline constexpr char kTrustedVaultServiceURL[] = "trusted-vault-service-url";
  34. // Returns whether sync is allowed to run based on command-line switches.
  35. // Profile::IsSyncAllowed() is probably a better signal than this function.
  36. // This function can be called from any thread, and the implementation doesn't
  37. // assume it's running on the UI thread.
  38. bool IsSyncAllowedByFlag();
  39. } // namespace syncer
  40. #endif // COMPONENTS_SYNC_BASE_COMMAND_LINE_SWITCHES_H_