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

Side by Side Diff: webkit/glue/webfileutilities_impl.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBFILEUTILITIES_IMPL_H_ 5 #ifndef WEBFILEUTILITIES_IMPL_H_
6 #define WEBFILEUTILITIES_IMPL_H_ 6 #define WEBFILEUTILITIES_IMPL_H_
7 7
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileUtilities.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileUtilities.h"
10 #include "webkit/glue/webkit_glue_export.h" 11 #include "webkit/glue/webkit_glue_export.h"
11 12
12 namespace webkit_glue { 13 namespace webkit_glue {
13 14
14 class WEBKIT_GLUE_EXPORT WebFileUtilitiesImpl : 15 class WEBKIT_GLUE_EXPORT WebFileUtilitiesImpl :
15 NON_EXPORTED_BASE(public WebKit::WebFileUtilities) { 16 NON_EXPORTED_BASE(public WebKit::WebFileUtilities) {
16 public: 17 public:
17 WebFileUtilitiesImpl(); 18 WebFileUtilitiesImpl();
18 virtual ~WebFileUtilitiesImpl(); 19 virtual ~WebFileUtilitiesImpl();
19 20
20 // WebFileUtilities methods: 21 // WebFileUtilities methods:
21 virtual bool fileExists(const WebKit::WebString& path); 22 virtual bool fileExists(const WebKit::WebString& path);
22 virtual bool deleteFile(const WebKit::WebString& path); 23 virtual bool deleteFile(const WebKit::WebString& path);
23 virtual bool deleteEmptyDirectory(const WebKit::WebString& path); 24 virtual bool deleteEmptyDirectory(const WebKit::WebString& path);
24 virtual bool getFileSize(const WebKit::WebString& path, long long& result); 25 virtual bool getFileSize(const WebKit::WebString& path, long long& result);
25 virtual bool getFileModificationTime( 26 virtual bool getFileModificationTime(
26 const WebKit::WebString& path, 27 const WebKit::WebString& path,
27 double& result); 28 double& result);
29 virtual bool getFileInfo(
30 const WebKit::WebString& path,
31 WebKit::WebFileInfo& result);
28 virtual WebKit::WebString directoryName(const WebKit::WebString& path); 32 virtual WebKit::WebString directoryName(const WebKit::WebString& path);
29 virtual WebKit::WebString pathByAppendingComponent( 33 virtual WebKit::WebString pathByAppendingComponent(
30 const WebKit::WebString& path, const WebKit::WebString& component); 34 const WebKit::WebString& path, const WebKit::WebString& component);
31 virtual bool makeAllDirectories(const WebKit::WebString& path); 35 virtual bool makeAllDirectories(const WebKit::WebString& path);
32 virtual WebKit::WebString getAbsolutePath(const WebKit::WebString& path); 36 virtual WebKit::WebString getAbsolutePath(const WebKit::WebString& path);
33 virtual bool isDirectory(const WebKit::WebString& path); 37 virtual bool isDirectory(const WebKit::WebString& path);
34 virtual WebKit::WebURL filePathToURL(const WebKit::WebString& path); 38 virtual WebKit::WebURL filePathToURL(const WebKit::WebString& path);
35 virtual base::PlatformFile openFile(const WebKit::WebString& path, int mode); 39 virtual base::PlatformFile openFile(const WebKit::WebString& path, int mode);
36 virtual void closeFile(base::PlatformFile& handle); 40 virtual void closeFile(base::PlatformFile& handle);
37 virtual long long seekFile(base::PlatformFile handle, 41 virtual long long seekFile(base::PlatformFile handle,
38 long long offset, 42 long long offset,
39 int origin); 43 int origin);
40 virtual bool truncateFile(base::PlatformFile handle, long long offset); 44 virtual bool truncateFile(base::PlatformFile handle, long long offset);
41 virtual int readFromFile(base::PlatformFile handle, char* data, int length); 45 virtual int readFromFile(base::PlatformFile handle, char* data, int length);
42 virtual int writeToFile(base::PlatformFile handle, 46 virtual int writeToFile(base::PlatformFile handle,
43 const char* data, 47 const char* data,
44 int length); 48 int length);
45 49
46 void set_sandbox_enabled(bool sandbox_enabled) { 50 void set_sandbox_enabled(bool sandbox_enabled) {
47 sandbox_enabled_ = sandbox_enabled; 51 sandbox_enabled_ = sandbox_enabled;
48 } 52 }
49 53
50 protected: 54 protected:
51 bool sandbox_enabled_; 55 bool sandbox_enabled_;
52 }; 56 };
53 57
54 } // namespace webkit_glue 58 } // namespace webkit_glue
55 59
56 #endif // WEBFILEUTILITIES_IMPL_H_ 60 #endif // WEBFILEUTILITIES_IMPL_H_
OLDNEW
« no previous file with comments | « content/worker/worker_webkitplatformsupport_impl.cc ('k') | webkit/glue/webfileutilities_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698