1 // 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 10 #include "components/sync/base/sync_mode.h" 11 #include "components/sync/engine/configure_reason.h" 12 #include "google_apis/gaia/core_account_id.h" 13 14 namespace 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. 22 struct ConfigureContext { 23 CoreAccountId authenticated_account_id; 24 std::string cache_guid; 25 SyncMode sync_mode = SyncMode::kFull; 26 ConfigureReason reason = CONFIGURE_REASON_UNKNOWN; 27 base::Time configuration_start_time; 28 // 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_ 36