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

Unified Diff: base/test/test_file_util.h

Issue 9355050: Added read-only file error test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment. 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 | base/test/test_file_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_file_util.h
diff --git a/base/test/test_file_util.h b/base/test/test_file_util.h
index ce0b30259371cd845ab90d45f592a395cb82b5da..9a4bb4a01b42ec7cf402a07db824a13bcfdae080 100644
--- a/base/test/test_file_util.h
+++ b/base/test/test_file_util.h
@@ -56,6 +56,18 @@ FilePath WStringAsFilePath(const std::wstring& path);
bool MakeFileUnreadable(const FilePath& path) WARN_UNUSED_RESULT;
bool MakeFileUnwritable(const FilePath& path) WARN_UNUSED_RESULT;
+// Gets a blob indicating the permission information for |path|.
+// |length| is the length of the blob. Zero on failure.
+// Returns the blob pointer, or NULL on failure.
+void* GetPermissionInfo(const FilePath& path, size_t* length);
Paweł Hajdan Jr. 2012/02/27 09:09:25 I don't like this interface. How about a scoped ob
ahendrickson 2012/02/27 16:39:34 Done.
+
+// Restores the permission information for |path|, given the blob retrieved
+// using |GetPermissionInfo()|.
+// |info| is the pointer to the blob.
+// |length| is the length of the blob.
+// Either |info| or |length| may be NULL/0, in which case nothing happens.
+bool RestorePermissionInfo(const FilePath& path, void* info, size_t length);
+
} // namespace file_util
#endif // BASE_TEST_TEST_FILE_UTIL_H_
« no previous file with comments | « no previous file | base/test/test_file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698