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

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: Cleaned up. 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 case kFileSystemTypeCloudDevice:
73 case kFileSystemTypeProvided:
73 return FILE_PERMISSION_USE_FILE_PERMISSION; 74 return FILE_PERMISSION_USE_FILE_PERMISSION;
74 75
75 case kFileSystemTypeRestrictedNativeLocal: 76 case kFileSystemTypeRestrictedNativeLocal:
76 return FILE_PERMISSION_READ_ONLY | 77 return FILE_PERMISSION_READ_ONLY |
77 FILE_PERMISSION_USE_FILE_PERMISSION; 78 FILE_PERMISSION_USE_FILE_PERMISSION;
78 79
79 // Following types are only accessed via IsolatedFileSystem, and 80 // Following types are only accessed via IsolatedFileSystem, and
80 // don't have their own permission policies. 81 // don't have their own permission policies.
81 case kFileSystemTypeDeviceMedia: 82 case kFileSystemTypeDeviceMedia:
82 case kFileSystemTypeDragged: 83 case kFileSystemTypeDragged:
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 } else if (parent != child) { 556 } else if (parent != child) {
556 bool result = parent.AppendRelativePath(child, &path); 557 bool result = parent.AppendRelativePath(child, &path);
557 DCHECK(result); 558 DCHECK(result);
558 } 559 }
559 560
560 operation_runner()->GetMetadata( 561 operation_runner()->GetMetadata(
561 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); 562 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info));
562 } 563 }
563 564
564 } // namespace fileapi 565 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698