| 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/browser/fileapi/file_system_context.h" | 5 #include "webkit/browser/fileapi/file_system_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Following types are only accessed via IsolatedFileSystem, and | 80 // Following types are only accessed via IsolatedFileSystem, and |
| 81 // don't have their own permission policies. | 81 // don't have their own permission policies. |
| 82 case kFileSystemTypeDeviceMedia: | 82 case kFileSystemTypeDeviceMedia: |
| 83 case kFileSystemTypeDragged: | 83 case kFileSystemTypeDragged: |
| 84 case kFileSystemTypeForTransientFile: | 84 case kFileSystemTypeForTransientFile: |
| 85 case kFileSystemTypeIphoto: | 85 case kFileSystemTypeIphoto: |
| 86 case kFileSystemTypeItunes: | 86 case kFileSystemTypeItunes: |
| 87 case kFileSystemTypeNativeMedia: | 87 case kFileSystemTypeNativeMedia: |
| 88 case kFileSystemTypePicasa: | 88 case kFileSystemTypePicasa: |
| 89 case kFileSystemTypePluginPrivate: | 89 case kFileSystemTypePluginPrivate: |
| 90 return FILE_PERMISSION_ALWAYS_DENY; | 90 return FILE_PERMISSION_USE_FILE_PERMISSION; |
| 91 | 91 |
| 92 // Following types only appear as mount_type, and will not be | 92 // Following types only appear as mount_type, and will not be |
| 93 // queried for their permission policies. | 93 // queried for their permission policies. |
| 94 case kFileSystemTypeIsolated: | 94 case kFileSystemTypeIsolated: |
| 95 case kFileSystemTypeExternal: | 95 case kFileSystemTypeExternal: |
| 96 return FILE_PERMISSION_ALWAYS_DENY; | 96 return FILE_PERMISSION_ALWAYS_DENY; |
| 97 | 97 |
| 98 // Following types should not be used to access files by FileAPI clients. | 98 // Following types should not be used to access files by FileAPI clients. |
| 99 case kFileSystemTypeTest: | 99 case kFileSystemTypeTest: |
| 100 case kFileSystemTypeSyncableForInternalSync: | 100 case kFileSystemTypeSyncableForInternalSync: |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 } else if (parent != child) { | 574 } else if (parent != child) { |
| 575 bool result = parent.AppendRelativePath(child, &path); | 575 bool result = parent.AppendRelativePath(child, &path); |
| 576 DCHECK(result); | 576 DCHECK(result); |
| 577 } | 577 } |
| 578 | 578 |
| 579 operation_runner()->GetMetadata( | 579 operation_runner()->GetMetadata( |
| 580 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); | 580 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); |
| 581 } | 581 } |
| 582 | 582 |
| 583 } // namespace fileapi | 583 } // namespace fileapi |
| OLD | NEW |