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

Unified Diff: webkit/fileapi/file_system_file_util.h

Issue 7717020: Adding Size() to AbstractFileEnumerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 4 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 | webkit/fileapi/file_system_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_file_util.h
diff --git a/webkit/fileapi/file_system_file_util.h b/webkit/fileapi/file_system_file_util.h
index 8a46fbdb6d5974369ce2d8e7b12bc76663879425..7ce1064d3d4586d12941131082ec984cd3213750 100644
--- a/webkit/fileapi/file_system_file_util.h
+++ b/webkit/fileapi/file_system_file_util.h
@@ -5,6 +5,8 @@
#ifndef WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
#define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
+#include <vector>
+
#include "base/callback.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -222,20 +224,25 @@ class FileSystemFileUtil {
// Returns an empty string if there are no more results.
virtual FilePath Next() = 0;
+ virtual int64 Size() = 0;
virtual bool IsDirectory() = 0;
};
class EmptyFileEnumerator : public AbstractFileEnumerator {
- virtual FilePath Next() { return FilePath(); }
- virtual bool IsDirectory() { return false; }
+ virtual FilePath Next() OVERRIDE { return FilePath(); }
+ virtual int64 Size() OVERRIDE { return 0; }
+ virtual bool IsDirectory() OVERRIDE { return false; }
};
// Returns a pointer to a new instance of AbstractFileEnumerator which is
// implemented for each FileUtil subclass. The instance needs to be freed
// by the caller, and its lifetime should not extend past when the current
// call returns to the main FILE message loop.
+ //
+ // The supplied context must remain valid at least lifetime of the enumerator
+ // instance.
virtual AbstractFileEnumerator* CreateFileEnumerator(
- FileSystemOperationContext* unused,
+ FileSystemOperationContext* context,
const FilePath& root_path);
protected:
« no previous file with comments | « no previous file | webkit/fileapi/file_system_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698