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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_api.h

Issue 9545006: This adds some GData private API to the file manager (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One last SetBoolean Created 8 years, 10 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 | chrome/browser/chromeos/extensions/file_browser_private_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_browser_private_api.h
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.h b/chrome/browser/chromeos/extensions/file_browser_private_api.h
index 7ccd491d882a9ce4afcd54e3c367770dbfd528e6..8475d1d1e457e33dd1ecb1622c3db56f13264853 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.h
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.h
@@ -383,4 +383,46 @@ class FileDialogStringsFunction : public SyncExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings");
};
+// Retrieve property information for multiple files, returning a list of the
+// same length as the input list of file URLs. If a particular file has an
+// error, then return a dictionary with the key "error" set to the error number
+// (base::PlatformFileError) for that entry in the returned list.
+class GetGDataFilePropertiesFunction : public FileBrowserFunction {
+ public:
+ GetGDataFilePropertiesFunction();
+
+ protected:
+ virtual ~GetGDataFilePropertiesFunction();
+
+ // Virtual function that can be overridden to do operations on each virtual
+ // file path before fetching the properties. Return false to stop iterating
+ // over the files.
+ virtual bool DoOperation(const FilePath& file);
+
+ // AsyncExtensionFunction overrides.
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFileProperties");
+};
+
+// Pin multiple files in the cache, returning a list of file properties with the
+// updated cache state. The returned array is the same length as the input list
+// of file URLs. If a particular file has an error, then return a dictionary
+// with the key "error" set to the error number (base::PlatformFileError) for
+// that entry in the returned list.
+class PinGDataFileFunction : public GetGDataFilePropertiesFunction {
+ public:
+ PinGDataFileFunction();
+
+ protected:
+ virtual ~PinGDataFileFunction();
+
+ private:
+ // Actually do the pinning of each file.
+ virtual bool DoOperation(const FilePath& path) OVERRIDE;
+
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.pinGDataFile");
+};
+
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698