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

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
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..cfeb746afcdd5aff9ed7fddc9aa07d0f60f29a26 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,26 @@ 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 instance may depend on FileSystemOperationContext instance past as
+ // context. The context should be valid in the lifetime of the enumerator
+ // instance.
ericu 2011/08/26 16:38:24 How about just "The supplied context must remain v
tzik 2011/08/29 02:33:32 Done.
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') | webkit/fileapi/obfuscated_file_system_file_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698