chromium/components/sync/engine/syncer.h

// Copyright 2012 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_SYNC_ENGINE_SYNCER_H_
#define COMPONENTS_SYNC_ENGINE_SYNCER_H_

#include <stdint.h>

#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
#include "components/sync/base/data_type.h"
#include "components/sync/engine/syncer_error.h"

namespace sync_pb {
enum SyncEnums_GetUpdatesOrigin : int;
}  // namespace sync_pb

namespace syncer {

class CancelationSignal;
class GetUpdatesDelegate;
class NudgeTracker;
class SyncCycle;

// This enum should be in sync with SyncerErrorValues in enums.xml. These
// values are persisted to logs. Entries should not be renumbered and numeric
// values should never be reused. Exposed for tests.
// TODO(crbug.com/40864723): this enum no longer corresponds to SyncerError,
// modernize it.
// LINT.IfChange(SyncerErrorValues)
enum class SyncerErrorValueForUma {};
// LINT.ThenChange(/tools/metrics/histograms/metadata/sync/enums.xml:SyncerErrorValues)

// A Syncer provides a control interface for driving the sync cycle.  These
// cycles consist of downloading updates, parsing the response (aka. process
// updates), applying updates while resolving conflicts, and committing local
// changes.  Some of these steps may be skipped if they're deemed to be
// unnecessary.
//
// A Syncer instance expects to run on a dedicated thread.  Calls to SyncShare()
// may take an unbounded amount of time because it may block on network I/O, on
// lock contention, or on tasks posted to other threads.
class Syncer {};

}  // namespace syncer

#endif  // COMPONENTS_SYNC_ENGINE_SYNCER_H_