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

Side by Side Diff: webkit/browser/fileapi/file_system_context.cc

Issue 192573002: [fsp] Introduce file_system_provider::Service class for the FileSystemProvider API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplified. Created 6 years, 9 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/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
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
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
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/file_system_provider/mount/test.js ('k') | webkit/common/fileapi/file_system_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698