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

Unified Diff: chrome/common/extensions/file_browser_handler.h

Issue 9741002: Adding file access permissions to fileBrowserHandler manifest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: .. Created 8 years, 9 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/common/extensions/file_browser_handler.h
diff --git a/chrome/common/extensions/file_browser_handler.h b/chrome/common/extensions/file_browser_handler.h
index d407bf89908e585a325457dd99fb1cc39d33038c..d1c65f255f632629f11075bc9352b03162e86e28 100644
--- a/chrome/common/extensions/file_browser_handler.h
+++ b/chrome/common/extensions/file_browser_handler.h
@@ -50,6 +50,13 @@ class FileBrowserHandler {
default_icon_path_ = path;
}
+ // File access permissions.
+ bool AddFileAccessPermission(const std::string& permission_str);
Yoyo Zhou 2012/03/26 22:42:58 Both these functions should have some documentatio
tbarzic 2012/03/26 23:22:51 Done.
+ bool InvalidateFileAccessPermissions();
Yoyo Zhou 2012/03/26 22:42:58 I think it'd be clearer if it was called ValidateF
tbarzic 2012/03/26 23:22:51 Done.
+ bool CanRead() const;
+ bool CanWrite() const;
+ bool CanCreate() const;
+
private:
// The id for the extension this action belongs to (as defined in the
// extension manifest).
@@ -58,6 +65,8 @@ class FileBrowserHandler {
std::string default_icon_path_;
// The id for the FileBrowserHandler, for example: "PdfFileAction".
std::string id_;
+ unsigned int file_access_permission_flags_;
+
// A list of file filters.
URLPatternSet url_set_;
};

Powered by Google App Engine
This is Rietveld 408576698