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

Unified Diff: webkit/fileapi/obfuscated_file_system_file_util.h

Issue 7608011: Simplify directory path accounting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rolled in CR feedback. Created 9 years, 4 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_writer_delegate_unittest.cc ('k') | webkit/fileapi/obfuscated_file_system_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/obfuscated_file_system_file_util.h
diff --git a/webkit/fileapi/obfuscated_file_system_file_util.h b/webkit/fileapi/obfuscated_file_system_file_util.h
index 063fcd5a48f284637fb20a18378abf391123c16a..a3ad15e74f67a1d1af7f8de0e2974cafcc16d125 100644
--- a/webkit/fileapi/obfuscated_file_system_file_util.h
+++ b/webkit/fileapi/obfuscated_file_system_file_util.h
@@ -185,6 +185,13 @@ class ObfuscatedFileSystemFileUtil : public FileSystemFileUtil,
// and destroys the database on the disk.
bool DestroyDirectoryDatabase(const GURL& origin, FileSystemType type);
+ // Computes a cost for storing a given file in the obfuscated FSFU.
+ // As the cost of a file is independent of the cost of its parent directories,
+ // this ignores all but the BaseName of the supplied path. In order to
+ // compute the cost of adding a multi-segment directory recursively, call this
+ // on each path segment and add the results.
+ static int64 ComputeFilePathCost(const FilePath& path);
+
private:
typedef FileSystemDirectoryDatabase::FileId FileId;
typedef FileSystemDirectoryDatabase::FileInfo FileInfo;
« no previous file with comments | « webkit/fileapi/file_writer_delegate_unittest.cc ('k') | webkit/fileapi/obfuscated_file_system_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698