Index: chrome/browser/chromeos/gdata/gdata_files.h |
diff --git a/chrome/browser/chromeos/gdata/gdata_files.h b/chrome/browser/chromeos/gdata/gdata_files.h |
index 7ad78187f91e578bd1d6b86ba0ffe40a277126b3..5037df682a469200539428dc7f2a7c6c59dbd08e 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_files.h |
+++ b/chrome/browser/chromeos/gdata/gdata_files.h |
@@ -74,6 +74,19 @@ const int32 kProtoVersion = 1; |
typedef base::Callback<void(GDataFileError error)> |
FileOperationCallback; |
+// Used to get entry info from the file system. |
+// If |error| is not PLATFORM_FILE_OK, |entry_info| is set to NULL. |
+typedef base::Callback<void(GDataFileError error, |
+ scoped_ptr<GDataEntryProto> entry_proto)> |
+ GetEntryInfoCallback; |
+ |
+// Used to read a directory from the file system. |
+// If |error| is not PLATFORM_FILE_OK, |entries| is set to NULL. |
achuithb
2012/08/07 20:46:07
Isn't the error GDATA_FILE_OK?
satorux1
2012/08/07 21:13:20
Done.
|
+// |entries| are contents, both files and directories, of the directory. |
+typedef std::vector<GDataEntryProto> GDataEntryProtoVector; |
+typedef base::Callback<void(GDataFileError error, |
+ scoped_ptr<GDataEntryProtoVector> entries)> |
+ ReadDirectoryCallback; |
// Base class for representing files and directories in gdata virtual file |
// system. |
class GDataEntry { |
@@ -400,6 +413,18 @@ class GDataDirectoryService { |
void GetEntryByResourceIdAsync(const std::string& resource_id, |
const GetEntryByResourceIdCallback& callback); |
+ // Finds an entry (a file or a directory) by |file_path|. |
+ // |
+ // Must be called from UI thread. |callback| is run on UI thread. |
+ void GetEntryInfoByPath(const FilePath& file_path, |
+ const GetEntryInfoCallback& callback); |
achuithb
2012/08/07 20:46:07
indentation.
satorux1
2012/08/07 21:13:20
Done.
|
+ |
+ // Finds and reads a directory by |file_path|. |
+ // |
+ // Must be called from UI thread. |callback| is run on UI thread. |
+ void ReadDirectoryByPath(const FilePath& file_path, |
+ const ReadDirectoryCallback& callback); |
+ |
// Replaces file entry with the same resource id as |fresh_file| with its |
// fresh value |fresh_file|. |
void RefreshFile(scoped_ptr<GDataFile> fresh_file); |