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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 int FileSystemContext::GetPermissionPolicy(FileSystemType type) { | 62 int FileSystemContext::GetPermissionPolicy(FileSystemType type) { |
63 switch (type) { | 63 switch (type) { |
64 case kFileSystemTypeTemporary: | 64 case kFileSystemTypeTemporary: |
65 case kFileSystemTypePersistent: | 65 case kFileSystemTypePersistent: |
66 case kFileSystemTypeSyncable: | 66 case kFileSystemTypeSyncable: |
67 return FILE_PERMISSION_SANDBOX; | 67 return FILE_PERMISSION_SANDBOX; |
68 | 68 |
69 case kFileSystemTypeDrive: | 69 case kFileSystemTypeDrive: |
70 case kFileSystemTypeNativeForPlatformApp: | 70 case kFileSystemTypeNativeForPlatformApp: |
71 case kFileSystemTypeNativeLocal: | 71 case kFileSystemTypeNativeLocal: |
| 72 case kFileSystemTypeCloudDevice: |
72 return FILE_PERMISSION_USE_FILE_PERMISSION; | 73 return FILE_PERMISSION_USE_FILE_PERMISSION; |
73 | 74 |
74 case kFileSystemTypeRestrictedNativeLocal: | 75 case kFileSystemTypeRestrictedNativeLocal: |
75 return FILE_PERMISSION_READ_ONLY | | 76 return FILE_PERMISSION_READ_ONLY | |
76 FILE_PERMISSION_USE_FILE_PERMISSION; | 77 FILE_PERMISSION_USE_FILE_PERMISSION; |
77 | 78 |
78 // Following types are only accessed via IsolatedFileSystem, and | 79 // Following types are only accessed via IsolatedFileSystem, and |
79 // don't have their own permission policies. | 80 // don't have their own permission policies. |
80 case kFileSystemTypeDeviceMedia: | 81 case kFileSystemTypeDeviceMedia: |
81 case kFileSystemTypeDragged: | 82 case kFileSystemTypeDragged: |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 } else if (parent != child) { | 564 } else if (parent != child) { |
564 bool result = parent.AppendRelativePath(child, &path); | 565 bool result = parent.AppendRelativePath(child, &path); |
565 DCHECK(result); | 566 DCHECK(result); |
566 } | 567 } |
567 | 568 |
568 operation_runner()->GetMetadata( | 569 operation_runner()->GetMetadata( |
569 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); | 570 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); |
570 } | 571 } |
571 | 572 |
572 } // namespace fileapi | 573 } // namespace fileapi |
OLD | NEW |