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

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: Added pinning API 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
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..76b0b8713a87adcaa82ca5e8f236635f262b66f4 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();
+
+ // 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 FileBrowserFunction {
+ public:
+ PinGDataFileFunction();
+
+ protected:
+ virtual ~PinGDataFileFunction();
+
+ // AsyncExtensionFunction overrides.
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+ friend class base::Callback<void(const FilePath&)>;
+
+ // Actually do the pinning of each file.
+ void PinFile(const FilePath& path);
+
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.pinGDataFile");
+};
+
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_

Powered by Google App Engine
This is Rietveld 408576698