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

Side by Side Diff: webkit/fileapi/obfuscated_file_util.cc

Issue 10810053: Enables internal filesystem types via Isolated filesystems (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 other_type = kFileSystemTypePersistent; 964 other_type = kFileSystemTypePersistent;
965 break; 965 break;
966 case kFileSystemTypePersistent: 966 case kFileSystemTypePersistent:
967 other_type = kFileSystemTypeTemporary; 967 other_type = kFileSystemTypeTemporary;
968 break; 968 break;
969 // These types shouldn't be used. 969 // These types shouldn't be used.
970 case kFileSystemTypeUnknown: 970 case kFileSystemTypeUnknown:
971 case kFileSystemTypeIsolated: 971 case kFileSystemTypeIsolated:
972 case kFileSystemTypeExternal: 972 case kFileSystemTypeExternal:
973 case kFileSystemTypeTest: 973 case kFileSystemTypeTest:
974 case kFileSystemTypeDragged:
975 case kFileSystemTypeMedia:
974 NOTREACHED(); 976 NOTREACHED();
975 } 977 }
976 if (!file_util::DirectoryExists( 978 if (!file_util::DirectoryExists(
977 origin_path.Append(GetDirectoryNameForType(other_type)))) { 979 origin_path.Append(GetDirectoryNameForType(other_type)))) {
978 InitOriginDatabase(false); 980 InitOriginDatabase(false);
979 if (origin_database_.get()) 981 if (origin_database_.get())
980 origin_database_->RemovePathForOrigin(GetOriginIdentifierFromURL(origin)); 982 origin_database_->RemovePathForOrigin(GetOriginIdentifierFromURL(origin));
981 if (!file_util::Delete(origin_path, true /* recursive */)) 983 if (!file_util::Delete(origin_path, true /* recursive */))
982 return false; 984 return false;
983 } 985 }
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 error = NativeFileUtil::CreateDirectory( 1396 error = NativeFileUtil::CreateDirectory(
1395 new_local_path, false /* exclusive */, false /* recursive */); 1397 new_local_path, false /* exclusive */, false /* recursive */);
1396 if (error != base::PLATFORM_FILE_OK) 1398 if (error != base::PLATFORM_FILE_OK)
1397 return error; 1399 return error;
1398 1400
1399 *local_path = new_local_path.AppendASCII(StringPrintf("%08" PRId64, number)); 1401 *local_path = new_local_path.AppendASCII(StringPrintf("%08" PRId64, number));
1400 return base::PLATFORM_FILE_OK; 1402 return base::PLATFORM_FILE_OK;
1401 } 1403 }
1402 1404
1403 } // namespace fileapi 1405 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698