data_type_activation_request.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_MODEL_DATA_TYPE_ACTIVATION_REQUEST_H_
  5. #define COMPONENTS_SYNC_MODEL_DATA_TYPE_ACTIVATION_REQUEST_H_
  6. #include <string>
  7. #include "base/time/time.h"
  8. #include "components/sync/base/sync_mode.h"
  9. #include "components/sync/model/model_error.h"
  10. #include "google_apis/gaia/core_account_id.h"
  11. namespace syncer {
  12. // The state passed from ModelTypeController to the delegate during DataType
  13. // activation.
  14. struct DataTypeActivationRequest {
  15. DataTypeActivationRequest();
  16. DataTypeActivationRequest(const DataTypeActivationRequest& request);
  17. DataTypeActivationRequest(DataTypeActivationRequest&& request);
  18. ~DataTypeActivationRequest();
  19. DataTypeActivationRequest& operator=(
  20. const DataTypeActivationRequest& request);
  21. DataTypeActivationRequest& operator=(DataTypeActivationRequest&& request);
  22. bool IsValid() const;
  23. ModelErrorHandler error_handler;
  24. CoreAccountId authenticated_account_id;
  25. std::string cache_guid;
  26. SyncMode sync_mode = SyncMode::kFull;
  27. // The start time of the confuguration this activation is part of.
  28. base::Time configuration_start_time;
  29. };
  30. } // namespace syncer
  31. #endif // COMPONENTS_SYNC_MODEL_DATA_TYPE_ACTIVATION_REQUEST_H_