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

Unified Diff: webkit/glue/webkit_glue.cc

Issue 10441016: Add FileUtilities::GetFileInfo() to capture file metadata with single IPC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « webkit/glue/webkit_glue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webkit_glue.cc
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index 7eb8cfa111bbe49814c701e9d0165a6fa0972619..5f64176a8701ff6d5af89a1dbb8a0980c7679a1d 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -39,6 +39,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGlyphCache.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h"
@@ -349,6 +350,18 @@ WebKit::WebFileError PlatformFileErrorToWebFileError(
}
}
+void PlatformFileInfoToWebFileInfo(
+ const base::PlatformFileInfo& file_info,
+ WebKit::WebFileInfo* web_file_info) {
+ DCHECK(web_file_info);
+ web_file_info->modificationTime = file_info.last_modified.ToDoubleT();
+ web_file_info->length = file_info.size;
+ if (file_info.is_directory)
+ web_file_info->type = WebKit::WebFileInfo::TypeDirectory;
+ else
+ web_file_info->type = WebKit::WebFileInfo::TypeFile;
+}
+
namespace {
class UserAgentState {
« no previous file with comments | « webkit/glue/webkit_glue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698