blob: 086dccccdea99b6a5d0e8724e2970ba9d7e7d157 [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361// Copyright 2018 The Chromium Authors
Mikel Astiz1f26c182018-08-01 05:04:292// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Mikel Astiz91c345c2023-05-16 14:18:565#ifndef COMPONENTS_SYNC_SERVICE_CONFIGURE_CONTEXT_H_
6#define COMPONENTS_SYNC_SERVICE_CONFIGURE_CONTEXT_H_
Mikel Astiz1f26c182018-08-01 05:04:297
8#include <string>
9
Peter Kastingb4ee3372021-07-06 23:02:2910#include "base/time/time.h"
Marc Treib659e6052019-09-18 10:49:0711#include "components/sync/base/sync_mode.h"
Mikel Astiz1f26c182018-08-01 05:04:2912#include "components/sync/engine/configure_reason.h"
Rushan Suleymanov3591a932025-04-23 05:26:1213#include "google_apis/gaia/gaia_id.h"
Mikel Astiz1f26c182018-08-01 05:04:2914
15namespace syncer {
16
17// Struct describing in which context sync was enabled, including state that can
18// be assumed to be fixed while sync is enabled (or, more precisely, is
19// representative of the last (re)configuration request). It's built by
Victor Hugo Vianna Silvab7785422021-06-04 09:15:2120// SyncServiceImpl and plumbed through DataTypeManager until datatype
Mikel Astiz65d053d32025-03-27 10:27:4821// controllers, which propagate analogous information to the processor/bridge
22// via DataTypeActivationRequest.
Mikel Astiz1f26c182018-08-01 05:04:2923struct ConfigureContext {
Rushan Suleymanov3591a932025-04-23 05:26:1224 GaiaId authenticated_gaia_id;
Mikel Astiz1f26c182018-08-01 05:04:2925 std::string cache_guid;
Marc Treib659e6052019-09-18 10:49:0726 SyncMode sync_mode = SyncMode::kFull;
Mikel Astiz1f26c182018-08-01 05:04:2927 ConfigureReason reason = CONFIGURE_REASON_UNKNOWN;
Jan Krcald60d6b92018-11-21 19:41:4528 base::Time configuration_start_time;
Mikel Astiz1f26c182018-08-01 05:04:2929};
30
31} // namespace syncer
32
Mikel Astiz91c345c2023-05-16 14:18:5633#endif // COMPONENTS_SYNC_SERVICE_CONFIGURE_CONTEXT_H_