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

Unified Diff: webkit/fileapi/file_system_util.h

Issue 9663021: Add database recovery for FileSystemOriginDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « webkit/fileapi/file_system_origin_database_unittest.cc ('k') | webkit/fileapi/file_system_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_util.h
diff --git a/webkit/fileapi/file_system_util.h b/webkit/fileapi/file_system_util.h
index 247d5ce30c24127ddcafe8d548725f0ad1b13cf2..730cc55c11f15e2fc9a8c4a4cf73cdf8aab09875 100644
--- a/webkit/fileapi/file_system_util.h
+++ b/webkit/fileapi/file_system_util.h
@@ -92,6 +92,19 @@ GURL GetOriginURLFromIdentifier(const std::string& origin_identifier);
// Returns an empty string if the |type| is invalid.
std::string GetFileSystemTypeString(FileSystemType type);
+// Encodes |file_path| to a string.
+// Following conditions should be held:
+// - StringToFilePath(FilePathToString(path)) == path
+// - StringToFilePath(FilePathToString(path) + "/" + "SubDirectory") ==
+// path.AppendASCII("SubDirectory");
+//
+// TODO(tzik): Replace CreateFilePath and FilePathToString in
+// third_party/leveldatabase/env_chromium.cc with them.
+std::string FilePathToString(const FilePath& file_path);
+
+// Decode a file path from |file_path_string|.
+FilePath StringToFilePath(const std::string& file_path_string);
+
} // namespace fileapi
#endif // WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_
« no previous file with comments | « webkit/fileapi/file_system_origin_database_unittest.cc ('k') | webkit/fileapi/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698