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

Unified Diff: content/child/file_info_util.cc

Issue 884413002: Upgrade Blink to milliseconds-based last modified filetimes, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/file_info_util.cc
diff --git a/content/child/file_info_util.cc b/content/child/file_info_util.cc
index ba257310f46da7d5a4c3343ffd88ce856bec803d..9d616c0427f349f9770ec9cde8daeb2cac945116 100644
--- a/content/child/file_info_util.cc
+++ b/content/child/file_info_util.cc
@@ -13,10 +13,14 @@ void FileInfoToWebFileInfo(const base::File::Info& file_info,
blink::WebFileInfo* web_file_info) {
DCHECK(web_file_info);
// WebKit now expects NaN as uninitialized/null Date.
- if (file_info.last_modified.is_null())
+ if (file_info.last_modified.is_null()) {
web_file_info->modificationTime = std::numeric_limits<double>::quiet_NaN();
- else
+ web_file_info->modificationTimeMS =
+ std::numeric_limits<double>::quiet_NaN();
+ } else {
web_file_info->modificationTime = file_info.last_modified.ToDoubleT();
+ web_file_info->modificationTimeMS = file_info.last_modified.ToJsTime();
+ }
web_file_info->length = file_info.size;
if (file_info.is_directory)
web_file_info->type = blink::WebFileInfo::TypeDirectory;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698