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

Side by Side Diff: webkit/glue/webkit_glue.cc

Issue 151023002: Move the rest of webkit/glue into content/common (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm webkit_glue.gyp Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webkit_glue.h ('k') | webkit/glue/webkit_glue.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/glue/webkit_glue.h"
6
7 #include "base/logging.h"
8 #include "third_party/WebKit/public/platform/WebFileInfo.h"
9
10 namespace webkit_glue {
11
12 void FileInfoToWebFileInfo(
13 const base::File::Info& file_info,
14 blink::WebFileInfo* web_file_info) {
15 DCHECK(web_file_info);
16 // WebKit now expects NaN as uninitialized/null Date.
17 if (file_info.last_modified.is_null())
18 web_file_info->modificationTime = std::numeric_limits<double>::quiet_NaN();
19 else
20 web_file_info->modificationTime = file_info.last_modified.ToDoubleT();
21 web_file_info->length = file_info.size;
22 if (file_info.is_directory)
23 web_file_info->type = blink::WebFileInfo::TypeDirectory;
24 else
25 web_file_info->type = blink::WebFileInfo::TypeFile;
26 }
27
28 COMPILE_ASSERT(std::numeric_limits<double>::has_quiet_NaN, has_quiet_NaN);
29
30 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.h ('k') | webkit/glue/webkit_glue.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698