Add PDF creation and modification dates to DocumentMetadata
Store the creation and modification dates as base::Time fields in
DocumentMetadata.
Bug: 93619
Change-Id: I34eedf5cf88dd102e492ed0451d3e4a4a7988cc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2610626
Commit-Queue: Daniel Hosseinian <[email protected]>
Reviewed-by: K. Moon <[email protected]>
Cr-Commit-Position: refs/heads/master@{#843376}
diff --git a/pdf/document_metadata.h b/pdf/document_metadata.h
index c1af1bb..39b1975 100644
--- a/pdf/document_metadata.h
+++ b/pdf/document_metadata.h
@@ -7,6 +7,8 @@
#include <string>
+#include "base/time/time.h"
+
namespace chrome_pdf {
// These values are persisted to logs. Entries should not be renumbered and
@@ -29,8 +31,7 @@
// Document properties, including those specified in the document information
// dictionary (see section 14.3.3 "Document Information Dictionary" of the ISO
// 32000-1 standard), as well as other properties about the file.
-// TODO(crbug.com/93619): Finish adding information dictionary fields like
-// `creation_date` and `mod_date`. Also add fields like `size_bytes` and
+// TODO(crbug.com/93619): Finish adding fields like `size_bytes` and
// `is_encrypted`.
struct DocumentMetadata {
DocumentMetadata();
@@ -62,6 +63,12 @@
// If the document's format was not originally PDF, the name of the
// application that converted the document to PDF.
std::string producer;
+
+ // The date and time the document was created.
+ base::Time creation_date;
+
+ // The date and time the document was most recently modified
+ base::Time mod_date;
};
} // namespace chrome_pdf