File: browser_sync_switches.h

package info (click to toggle)
chromium 138.0.7204.92-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,576 kB
  • sloc: cpp: 34,933,512; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,956; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (53 lines) | stat: -rw-r--r-- 2,450 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_BROWSER_SYNC_BROWSER_SYNC_SWITCHES_H_
#define COMPONENTS_BROWSER_SYNC_BROWSER_SYNC_SWITCHES_H_

#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"

namespace switches {

// Enabled the local sync backend implemented by the LoopbackServer.
inline constexpr char kEnableLocalSyncBackend[] = "enable-local-sync-backend";

// Specifies the local sync backend directory. The name is chosen to mimic
// user-data-dir etc. This flag only matters if the enable-local-sync-backend
// flag is present.
inline constexpr char kLocalSyncBackendDir[] = "local-sync-backend-dir";

// Disables the optimizations flags in Commit requests for sync invalidations.
// This is useful for live tests to avoid flakiness.
inline constexpr char kDisableSyncInvalidationOptimizations[] =
    "disable-sync-invalidation-optimizations";

// If enabled, eligible users (i.e. those for which Sync-the-feature is active)
// are migrated, at browser startup, to the signed-in non-syncing state.
BASE_DECLARE_FEATURE(kMigrateSyncingUserToSignedIn);

// Feature parameter for kMigrateSyncingUserToSignedIn.
// Say the user has sync-the-feature enabled but is in TransportState::PAUSED
// due to a persistent auth error.
// - If kMigrateSyncingUserToSignedIn is on & kForceMigrateSyncingUserToSignedIn
//   is off, MaybeMigrateSyncingUserToSignedIn() will only proceed with the
//   migration if kMinDelayToMigrateSyncPaused has passed since the first
//   call, or if the error got resolved in that meantime.
// - If both flags are on, the migration runs on the first call to
//   MaybeMigrateSyncingUserToSignedIn() and this value is irrelevant.
BASE_DECLARE_FEATURE_PARAM(base::TimeDelta, kMinDelayToMigrateSyncPaused);

// If enabled, users who were migrated from syncing to signed-in via the above
// flag are migrated back into the syncing state.
BASE_DECLARE_FEATURE(kUndoMigrationOfSyncingUserToSignedIn);

// If enabled in addition to `kMigrateSyncingUserToSignedIn`, then all users
// with Sync-the-feature enabled are migrated, at browser startup, to the
// signed-in non-syncing state. I.e. this bypasses the "eligibility"
// requirements.
BASE_DECLARE_FEATURE(kForceMigrateSyncingUserToSignedIn);

}  // namespace switches

#endif  // COMPONENTS_BROWSER_SYNC_BROWSER_SYNC_SWITCHES_H_