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

Unified Diff: webkit/fileapi/obfuscated_file_util.h

Issue 10701094: Don't keep file system directories around if they contain unrelated files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: error message Created 8 years, 5 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 | « chrome/browser/browsing_data_remover.cc ('k') | webkit/fileapi/obfuscated_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_util.h
diff --git a/webkit/fileapi/obfuscated_file_util.h b/webkit/fileapi/obfuscated_file_util.h
index 46f62624decf6bb3e9865e13e18257d8cde703c1..0bf67a072698015d45d370d1020d240ba5bcbcce 100644
--- a/webkit/fileapi/obfuscated_file_util.h
+++ b/webkit/fileapi/obfuscated_file_util.h
@@ -139,19 +139,17 @@ class FILEAPI_EXPORT_PRIVATE ObfuscatedFileUtil : public FileSystemFileUtil {
// Gets the topmost directory specific to this origin and type. This will
// contain both the directory database's files and all the backing file
// subdirectories.
+ // Returns an empty path if the directory is undefined (e.g. because |type|
+ // is invalid). If the directory is defined, it will be returned, even if
+ // there is a file system error (e.g. the directory doesn't exist on disk and
+ // |create| is false). Callers should always check |error_code| to make sure
+ // the returned path is usable.
FilePath GetDirectoryForOriginAndType(
const GURL& origin,
FileSystemType type,
bool create,
base::PlatformFileError* error_code);
- FilePath GetDirectoryForOriginAndType(
- const GURL& origin,
- FileSystemType type,
- bool create) {
- return GetDirectoryForOriginAndType(origin, type, create, NULL);
- }
-
// Deletes the topmost directory specific to this origin and type. This will
// delete its directory database.
bool DeleteDirectoryForOriginAndType(const GURL& origin, FileSystemType type);
« no previous file with comments | « chrome/browser/browsing_data_remover.cc ('k') | webkit/fileapi/obfuscated_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698