download_db_entry.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  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_DOWNLOAD_DATABASE_DOWNLOAD_DB_ENTRY_H_
  5. #define COMPONENTS_DOWNLOAD_DATABASE_DOWNLOAD_DB_ENTRY_H_
  6. #include <string>
  7. #include "components/download/database/download_info.h"
  8. #include "components/download/database/download_namespace.h"
  9. #include "third_party/abseil-cpp/absl/types/optional.h"
  10. namespace download {
  11. // Representing one entry in the DownloadDB.
  12. struct DownloadDBEntry {
  13. public:
  14. DownloadDBEntry();
  15. DownloadDBEntry(const DownloadDBEntry& other);
  16. ~DownloadDBEntry();
  17. bool operator==(const DownloadDBEntry& other) const;
  18. bool operator!=(const DownloadDBEntry& other) const;
  19. // Gets a unique ID for this entry.
  20. std::string GetGuid() const;
  21. // Information about a regular download.
  22. absl::optional<DownloadInfo> download_info;
  23. };
  24. } // namespace download
  25. #endif // COMPONENTS_DOWNLOAD_DATABASE_DOWNLOAD_DB_ENTRY_H_