blob: 54b7123b2641f8c62b331f4817ac8c883385b05e [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/sync/driver/sync_driver_switches.h"
#include "base/command_line.h"
#include "build/build_config.h"
namespace switches {
bool IsSyncAllowedByFlag() {
return !base::CommandLine::ForCurrentProcess()->HasSwitch(
// Disables syncing browser data to a Google Account.
const char kDisableSync[] = "disable-sync";
// Allows overriding the deferred init fallback timeout.
const char kSyncDeferredStartupTimeoutSeconds[] =
// Enables deferring sync backend initialization until user initiated changes
// occur.
const char kSyncDisableDeferredStartup[] = "sync-disable-deferred-startup";
// Controls whether the initial state of the "Capture Specifics" flag on
// chrome://sync-internals is enabled.
const char kSyncIncludeSpecificsInProtocolLog[] = "sync-include-specifics";
// Overrides the default server used for profile sync.
const char kSyncServiceURL[] = "sync-url";
// This flag causes sync to retry very quickly (see polling_constants.h) the
// when it encounters an error, as the first step towards exponential backoff.
const char kSyncShortInitialRetryOverride[] =
// This flag significantly shortens the delay between nudge cycles. Its primary
// purpose is to speed up integration tests. The normal delay allows coalescing
// and prevention of server overload, so don't use this unless you're really
// sure that it's what you want.
const char kSyncShortNudgeDelayForTest[] = "sync-short-nudge-delay-for-test";
// Allows custom passphrase users to receive Wallet data for secondary accounts
// while in transport-only mode.
const base::Feature kSyncAllowWalletDataInTransportModeWithCustomPassphrase{
// If enabled, the sync engine will be shut down in the "paused" state.
const base::Feature kStopSyncInPausedState{"StopSyncInPausedState",
// Controls whether a user can receive tabs from their synced devices
const base::Feature kSyncSendTabToSelf{"SyncSendTabToSelf",
// If enabled, allows the Sync machinery to start with a signed-in account that
// has *not* been chosen as Chrome's primary account (see IdentityManager).
const base::Feature kSyncSupportSecondaryAccount {
#if defined(OS_WIN) || defined(OS_MACOSX) || \
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
// Enable USS implementation of Bookmarks datatype.
const base::Feature kSyncUSSBookmarks{"SyncUSSBookmarks",
// Enable USS implementation of Passwords datatype.
const base::Feature kSyncUSSPasswords{"SyncUSSPasswords",
// Enable USS implementation of autofill wallet metadata datatype.
const base::Feature kSyncUSSAutofillWalletMetadata{
"SyncUSSAutofillWalletMetadata", base::FEATURE_ENABLED_BY_DEFAULT};
// Enable USS implementation of Nigori datatype.
const base::Feature kSyncUSSNigori{"SyncUSSNigori",
// Controls whether to enable syncing of Wi-Fi configurations.
const base::Feature kSyncWifiConfigurations{"SyncWifiConfigurations",
} // namespace switches