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

Unified Diff: webkit/fileapi/obfuscated_file_util.cc

Issue 10825042: Implement media path filter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: webkit/fileapi/obfuscated_file_util.cc
diff --git a/webkit/fileapi/obfuscated_file_util.cc b/webkit/fileapi/obfuscated_file_util.cc
index ac11d2e5fe91e1cd7cbc28e91a0908850af37b33..782ca00055fbb5246057e7c4d08dbff426b531ec 100644
--- a/webkit/fileapi/obfuscated_file_util.cc
+++ b/webkit/fileapi/obfuscated_file_util.cc
@@ -960,21 +960,13 @@ bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType(
// Delete the origin directory if the deleted one was the last remaining
// type for the origin, i.e. if the *other* type doesn't exist.
FileSystemType other_type = kFileSystemTypeUnknown;
- switch (type) {
- case kFileSystemTypeTemporary:
- other_type = kFileSystemTypePersistent;
- break;
- case kFileSystemTypePersistent:
- other_type = kFileSystemTypeTemporary;
- break;
- // These types shouldn't be used.
- case kFileSystemTypeUnknown:
- case kFileSystemTypeIsolated:
- case kFileSystemTypeExternal:
- case kFileSystemTypeTest:
- case kFileSystemTypeDragged:
- NOTREACHED();
- }
+ if (type == kFileSystemTypeTemporary)
+ other_type = kFileSystemTypePersistent;
+ else if (type == kFileSystemTypePersistent)
+ other_type = kFileSystemTypeTemporary;
+ else
+ NOTREACHED();
+
if (!file_util::DirectoryExists(
origin_path.Append(GetDirectoryNameForType(other_type)))) {
InitOriginDatabase(false);

Powered by Google App Engine
This is Rietveld 408576698