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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 switch (type) { | 64 switch (type) { |
65 case kFileSystemTypeTemporary: | 65 case kFileSystemTypeTemporary: |
66 case kFileSystemTypePersistent: | 66 case kFileSystemTypePersistent: |
67 case kFileSystemTypeSyncable: | 67 case kFileSystemTypeSyncable: |
68 return FILE_PERMISSION_SANDBOX; | 68 return FILE_PERMISSION_SANDBOX; |
69 | 69 |
70 case kFileSystemTypeDrive: | 70 case kFileSystemTypeDrive: |
71 case kFileSystemTypeNativeForPlatformApp: | 71 case kFileSystemTypeNativeForPlatformApp: |
72 case kFileSystemTypeNativeLocal: | 72 case kFileSystemTypeNativeLocal: |
73 case kFileSystemTypeCloudDevice: | 73 case kFileSystemTypeCloudDevice: |
| 74 case kFileSystemTypeProvided: |
74 return FILE_PERMISSION_USE_FILE_PERMISSION; | 75 return FILE_PERMISSION_USE_FILE_PERMISSION; |
75 | 76 |
76 case kFileSystemTypeRestrictedNativeLocal: | 77 case kFileSystemTypeRestrictedNativeLocal: |
77 return FILE_PERMISSION_READ_ONLY | | 78 return FILE_PERMISSION_READ_ONLY | |
78 FILE_PERMISSION_USE_FILE_PERMISSION; | 79 FILE_PERMISSION_USE_FILE_PERMISSION; |
79 | 80 |
80 // Following types are only accessed via IsolatedFileSystem, and | 81 // Following types are only accessed via IsolatedFileSystem, and |
81 // don't have their own permission policies. | 82 // don't have their own permission policies. |
82 case kFileSystemTypeDeviceMedia: | 83 case kFileSystemTypeDeviceMedia: |
83 case kFileSystemTypeDragged: | 84 case kFileSystemTypeDragged: |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 } else if (parent != child) { | 575 } else if (parent != child) { |
575 bool result = parent.AppendRelativePath(child, &path); | 576 bool result = parent.AppendRelativePath(child, &path); |
576 DCHECK(result); | 577 DCHECK(result); |
577 } | 578 } |
578 | 579 |
579 operation_runner()->GetMetadata( | 580 operation_runner()->GetMetadata( |
580 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); | 581 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); |
581 } | 582 } |
582 | 583 |
583 } // namespace fileapi | 584 } // namespace fileapi |
OLD | NEW |