user_note_metadata.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2022 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_USER_NOTES_MODEL_USER_NOTE_METADATA_H_
  5. #define COMPONENTS_USER_NOTES_MODEL_USER_NOTE_METADATA_H_
  6. #include "base/time/time.h"
  7. namespace user_notes {
  8. // Model class for a note.
  9. class UserNoteMetadata {
  10. public:
  11. explicit UserNoteMetadata(base::Time creation_date,
  12. base::Time modification_date,
  13. int min_note_version);
  14. ~UserNoteMetadata();
  15. UserNoteMetadata(const UserNoteMetadata&) = delete;
  16. UserNoteMetadata& operator=(const UserNoteMetadata&) = delete;
  17. base::Time creation_date() const { return creation_date_; }
  18. base::Time modification_date() const { return modification_date_; }
  19. int min_note_version() const { return min_note_version_; }
  20. private:
  21. // The date and time (stored in seconds UTC) when the note was created.
  22. base::Time creation_date_;
  23. // The date and time (stored in seconds UTC) when the note was last modified.
  24. base::Time modification_date_;
  25. // The minimum User Note version required to support this note.
  26. int min_note_version_;
  27. };
  28. } // namespace user_notes
  29. #endif // COMPONENTS_USER_NOTES_MODEL_USER_NOTE_METADATA_H_