blob: e0fd922a051de16060e5487b51eaa87450460929 [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"
12
13namespace syncer {
14
15// Struct describing in which context sync was enabled, including state that can
16// be assumed to be fixed while sync is enabled (or, more precisely, is
17// representative of the last (re)configuration request). It's built by
18// ProfileSyncService and plumbed through DataTypeManager until datatype
19// controllers, which for USS datatypes propagate analogous information to the
20// processor/bridge via DataTypeActivationRequest.
21struct ConfigureContext {
22 std::string authenticated_account_id;
23 std::string cache_guid;
Mikel Astizaa2ac6cd2018-08-02 15:58:2324 StorageOption storage_option = STORAGE_ON_DISK;
Mikel Astiz1f26c182018-08-01 05:04:2925 ConfigureReason reason = CONFIGURE_REASON_UNKNOWN;
Jan Krcald60d6b92018-11-21 19:41:4526 base::Time configuration_start_time;
Mikel Astiz1f26c182018-08-01 05:04:2927 // TODO(mastiz): Consider adding |requested_types| here, but currently there
28 // are subtle differences across layers (e.g. where control types are
29 // enforced).
30};
31
32} // namespace syncer
33
34#endif // COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_