blob: b144a52651bd3cf3db08fb123ef9551303821ab7 [file] [log] [blame]
Mikel Astiz1f26c182018-08-01 05:04:291// Copyright 2018 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
5#ifndef COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_
6#define COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_
7
8#include <string>
9
Jan Krcald60d6b92018-11-21 19:41:4510#include "components/sync/base/storage_option.h"
Mikel Astiz1f26c182018-08-01 05:04:2911#include "components/sync/engine/configure_reason.h"
Tanmoy Mollik49407672019-07-30 15:23:1612#include "google_apis/gaia/core_account_id.h"
Mikel Astiz1f26c182018-08-01 05:04:2913
14namespace syncer {
15
16// Struct describing in which context sync was enabled, including state that can
17// be assumed to be fixed while sync is enabled (or, more precisely, is
18// representative of the last (re)configuration request). It's built by
19// ProfileSyncService and plumbed through DataTypeManager until datatype
20// controllers, which for USS datatypes propagate analogous information to the
21// processor/bridge via DataTypeActivationRequest.
22struct ConfigureContext {
Tanmoy Mollik49407672019-07-30 15:23:1623 CoreAccountId authenticated_account_id;
Mikel Astiz1f26c182018-08-01 05:04:2924 std::string cache_guid;
Mikel Astizaa2ac6cd2018-08-02 15:58:2325 StorageOption storage_option = STORAGE_ON_DISK;
Mikel Astiz1f26c182018-08-01 05:04:2926 ConfigureReason reason = CONFIGURE_REASON_UNKNOWN;
Jan Krcald60d6b92018-11-21 19:41:4527 base::Time configuration_start_time;
Mikel Astiz1f26c182018-08-01 05:04:2928 // TODO(mastiz): Consider adding |requested_types| here, but currently there
29 // are subtle differences across layers (e.g. where control types are
30 // enforced).
31};
32
33} // namespace syncer
34
35#endif // COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_