• Kent Tamura's avatar
    Change the type of blink::FileMetadata::modification_time · 130029bc
    Kent Tamura authored
    from |double| to |base::Optional<base::Time>|.
    
    This CL is the first step to stop using |double| for file timestamps in Blink.
    
    Though base::Time can be an is_null() value, we apply
    base::Optional<base::Time> instead of just base::Time because:
    
     - In JavaScript, the null base::Time, which represents
       1601-01-01 00:00 UTC, is a valid time. We have to use
       base::Optional<base::Time> in some parts of Blink.
    
     - data_element.mojom applies |mojo_base.mojom.Time?| for file timestamps,
      and it is mapped to |base::Optional<base::Time>| in C++.
    
    This CL should have no user-visible behavior changes.
    
    Bug: 988343
    Change-Id: I91f592b31cf8e61053969530fafc689eea8ff538
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930756
    Auto-Submit: Kent Tamura <tkent@chromium.org>
    Reviewed-by: default avatarJoshua Bell <jsbell@chromium.org>
    Commit-Queue: Kent Tamura <tkent@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#718489}
    130029bc
file_metadata.cc 4.12 KB