configure_context.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #ifndef COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_
  5. #define COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_
  6. #include <string>
  7. #include "base/time/time.h"
  8. #include "components/sync/base/sync_mode.h"
  9. #include "components/sync/engine/configure_reason.h"
  10. #include "google_apis/gaia/core_account_id.h"
  11. namespace syncer {
  12. // Struct describing in which context sync was enabled, including state that can
  13. // be assumed to be fixed while sync is enabled (or, more precisely, is
  14. // representative of the last (re)configuration request). It's built by
  15. // SyncServiceImpl and plumbed through DataTypeManager until datatype
  16. // controllers, which for USS datatypes propagate analogous information to the
  17. // processor/bridge via DataTypeActivationRequest.
  18. struct ConfigureContext {
  19. CoreAccountId authenticated_account_id;
  20. std::string cache_guid;
  21. SyncMode sync_mode = SyncMode::kFull;
  22. ConfigureReason reason = CONFIGURE_REASON_UNKNOWN;
  23. base::Time configuration_start_time;
  24. // TODO(mastiz): Consider adding |requested_types| here, but currently there
  25. // are subtle differences across layers (e.g. where control types are
  26. // enforced).
  27. };
  28. } // namespace syncer
  29. #endif // COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_