Remove |double| timestamp code from blink::File

This CL changes:
- all timestamp arguments of File,
- the return value of LastModifiedMS(), and
- the type of snapshot_modification_time_ms_
from double to base::Optional<base::Time>.

This renames
 - LastModifiedMS() to LastModifiedTime() and
 - snapshot_modification_time_ms_ to snapshot_modification_time_
and removes
 - File::LastModifiedDate(),
 - InvalidFileTime() in file_metadata.h,
 - IsValidFileTime() in file_metadata.h,
 - ToJsTimeOrNaN() in file_metadata.h, and
 - JsTimeToOptionalTime() in file_metadata.h.

This CL fixes File.lastModified behavior for timestamps later than
275760-09-13T00:00Z by removing unnecessary double-base:Time

 Do not wrap test cases with |namespace { ... }| because
FRIEND_TEST_ALL_PREFIXES() doesn't work with it.

Change-Id: I630d869641ea033b68534f17178e78b8fc2d1953
Bug: 988343
Commit-Queue: Kent Tamura <>
Reviewed-by: Joshua Bell <>
Cr-Commit-Position: refs/heads/master@{#720806}
13 files changed