OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/fileapi/obfuscated_file_util.h" | 5 #include "webkit/fileapi/obfuscated_file_util.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
966 break; | 966 break; |
967 case kFileSystemTypePersistent: | 967 case kFileSystemTypePersistent: |
968 other_type = kFileSystemTypeTemporary; | 968 other_type = kFileSystemTypeTemporary; |
969 break; | 969 break; |
970 // These types shouldn't be used. | 970 // These types shouldn't be used. |
971 case kFileSystemTypeUnknown: | 971 case kFileSystemTypeUnknown: |
972 case kFileSystemTypeIsolated: | 972 case kFileSystemTypeIsolated: |
973 case kFileSystemTypeExternal: | 973 case kFileSystemTypeExternal: |
974 case kFileSystemTypeTest: | 974 case kFileSystemTypeTest: |
975 case kFileSystemTypeDragged: | 975 case kFileSystemTypeDragged: |
976 case kFileSystemTypeNativeMedia: | |
977 case kFileSystemTypeDeviceMedia: | |
976 NOTREACHED(); | 978 NOTREACHED(); |
kinuko
2012/07/28 01:23:35
This is not directly related to this cl but probab
tzik
2012/07/30 23:32:36
Done.
| |
977 } | 979 } |
978 if (!file_util::DirectoryExists( | 980 if (!file_util::DirectoryExists( |
979 origin_path.Append(GetDirectoryNameForType(other_type)))) { | 981 origin_path.Append(GetDirectoryNameForType(other_type)))) { |
980 InitOriginDatabase(false); | 982 InitOriginDatabase(false); |
981 if (origin_database_.get()) | 983 if (origin_database_.get()) |
982 origin_database_->RemovePathForOrigin(GetOriginIdentifierFromURL(origin)); | 984 origin_database_->RemovePathForOrigin(GetOriginIdentifierFromURL(origin)); |
983 if (!file_util::Delete(origin_path, true /* recursive */)) | 985 if (!file_util::Delete(origin_path, true /* recursive */)) |
984 return false; | 986 return false; |
985 } | 987 } |
986 | 988 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1396 error = NativeFileUtil::CreateDirectory( | 1398 error = NativeFileUtil::CreateDirectory( |
1397 new_local_path, false /* exclusive */, false /* recursive */); | 1399 new_local_path, false /* exclusive */, false /* recursive */); |
1398 if (error != base::PLATFORM_FILE_OK) | 1400 if (error != base::PLATFORM_FILE_OK) |
1399 return error; | 1401 return error; |
1400 | 1402 |
1401 *local_path = new_local_path.AppendASCII(StringPrintf("%08" PRId64, number)); | 1403 *local_path = new_local_path.AppendASCII(StringPrintf("%08" PRId64, number)); |
1402 return base::PLATFORM_FILE_OK; | 1404 return base::PLATFORM_FILE_OK; |
1403 } | 1405 } |
1404 | 1406 |
1405 } // namespace fileapi | 1407 } // namespace fileapi |
OLD | NEW |