data_type_encryption_handler.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright 2014 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_DATA_TYPE_ENCRYPTION_HANDLER_H_
  5. #define COMPONENTS_SYNC_DRIVER_DATA_TYPE_ENCRYPTION_HANDLER_H_
  6. #include "components/sync/base/model_type.h"
  7. namespace syncer {
  8. // The DataTypeEncryptionHandler provides the status of datatype encryption.
  9. class DataTypeEncryptionHandler {
  10. public:
  11. DataTypeEncryptionHandler() = default;
  12. virtual ~DataTypeEncryptionHandler() = default;
  13. // Returns whether there is an error that prevents encryption or decryption
  14. // from proceeding. This does not necessarily mean that the UI will display an
  15. // error state, for example if there's a user-transparent attempt to resolve
  16. // the crypto error.
  17. virtual bool HasCryptoError() const = 0;
  18. // Returns the current set of encrypted data types.
  19. virtual ModelTypeSet GetEncryptedDataTypes() const = 0;
  20. };
  21. } // namespace syncer
  22. #endif // COMPONENTS_SYNC_DRIVER_DATA_TYPE_ENCRYPTION_HANDLER_H_