Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1438)

Unified Diff: Source/platform/FileMetadata.h

Issue 884393002: Upgrade Blink to milliseconds-based last modified filetimes, part 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sof-fileinfo-modtime-in-ms-1
Patch Set: fix fast/storage test Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/FileMetadata.h
diff --git a/Source/platform/FileMetadata.h b/Source/platform/FileMetadata.h
index 924082dcb7e31dc8feb025293ea161f323ec9897..36e549c08528d278690be7ec3907abf2e48f1005 100644
--- a/Source/platform/FileMetadata.h
+++ b/Source/platform/FileMetadata.h
@@ -42,10 +42,18 @@ namespace blink {
inline double invalidFileTime() { return std::numeric_limits<double>::quiet_NaN(); }
inline bool isValidFileTime(double time) { return std::isfinite(time); }
-struct FileMetadata {
- // The last modification time of the file, in seconds.
- // The value 0.0 means that the time is not set.
- double modificationTime;
+class FileMetadata {
+public:
+ FileMetadata()
+ : modificationTimeMS(invalidFileTime())
+ , length(-1)
+ , type(TypeUnknown)
+ {
+ }
+
+ // The last modification time of the file, in milliseconds.
+ // The value NaN means that the time is not known.
+ double modificationTimeMS;
// The length of the file in bytes.
// The value -1 means that the length is not set.
@@ -59,8 +67,6 @@ struct FileMetadata {
Type type;
String platformPath;
-
- FileMetadata() : modificationTime(invalidFileTime()), length(-1), type(TypeUnknown) { }
};
PLATFORM_EXPORT bool getFileSize(const String&, long long& result);

Powered by Google App Engine
This is Rietveld 408576698