browser_sync_switches.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2015 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_BROWSER_SYNC_BROWSER_SYNC_SWITCHES_H_
  5. #define COMPONENTS_BROWSER_SYNC_BROWSER_SYNC_SWITCHES_H_
  6. #include "base/feature_list.h"
  7. #include "base/metrics/field_trial_params.h"
  8. #include "build/build_config.h"
  9. namespace switches {
  10. // Enabled the local sync backend implemented by the LoopbackServer.
  11. inline constexpr char kEnableLocalSyncBackend[] = "enable-local-sync-backend";
  12. // Specifies the local sync backend directory. The name is chosen to mimic
  13. // user-data-dir etc. This flag only matters if the enable-local-sync-backend
  14. // flag is present.
  15. inline constexpr char kLocalSyncBackendDir[] = "local-sync-backend-dir";
  16. // Sync invalidation switches.
  17. //
  18. // Enables providing the list of FCM registration tokens in the commit request.
  19. inline constexpr base::Feature kSyncUseFCMRegistrationTokensList{
  20. "SyncUseFCMRegistrationTokensList", base::FEATURE_ENABLED_BY_DEFAULT};
  21. // Max size of FCM registration tokens list. If the number of active devices
  22. // having FCM registration tokens is higher, then the resulting list will be
  23. // empty meaning unknown FCM registration tokens.
  24. inline constexpr base::FeatureParam<int> kSyncFCMRegistrationTokensListMaxSize{
  25. &kSyncUseFCMRegistrationTokensList, "SyncFCMRegistrationTokensListMaxSize",
  26. 5};
  27. // Enables filtering out inactive devices which haven't sent DeviceInfo update
  28. // recently (depending on the device's pulse_interval and an additional margin).
  29. inline constexpr base::Feature kSyncFilterOutInactiveDevicesForSingleClient{
  30. "SyncFilterOutInactiveDevicesForSingleClient",
  31. base::FEATURE_DISABLED_BY_DEFAULT};
  32. // An additional threshold to consider devices as active. It extends device's
  33. // pulse interval to mitigate possible latency after DeviceInfo commit.
  34. inline constexpr base::FeatureParam<base::TimeDelta> kSyncActiveDeviceMargin{
  35. &kSyncFilterOutInactiveDevicesForSingleClient, "SyncActiveDeviceMargin",
  36. base::Minutes(30)};
  37. } // namespace switches
  38. #endif // COMPONENTS_BROWSER_SYNC_BROWSER_SYNC_SWITCHES_H_