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

Side by Side Diff: webkit/fileapi/test_mount_point_provider.cc

Issue 11804005: Cleanup file permission check code in FileAPIMessageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros+native-local perm fix Created 7 years, 11 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
« no previous file with comments | « webkit/fileapi/test_mount_point_provider.h ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/fileapi/test_mount_point_provider.h" 5 #include "webkit/fileapi/test_mount_point_provider.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 bool TestMountPointProvider::IsRestrictedFileName( 108 bool TestMountPointProvider::IsRestrictedFileName(
109 const FilePath& filename) const { 109 const FilePath& filename) const {
110 return false; 110 return false;
111 } 111 }
112 112
113 FileSystemFileUtil* TestMountPointProvider::GetFileUtil(FileSystemType type) { 113 FileSystemFileUtil* TestMountPointProvider::GetFileUtil(FileSystemType type) {
114 return local_file_util_.get(); 114 return local_file_util_.get();
115 } 115 }
116 116
117 FilePath TestMountPointProvider::GetPathForPermissionsCheck( 117 FilePermissionPolicy TestMountPointProvider::GetPermissionPolicy(
118 const FilePath& virtual_path) const { 118 const FileSystemURL& url, int permissions) const {
119 return base_path_.Append(virtual_path); 119 return FILE_PERMISSION_ALWAYS_DENY;
120 } 120 }
121 121
122 FileSystemOperation* TestMountPointProvider::CreateFileSystemOperation( 122 FileSystemOperation* TestMountPointProvider::CreateFileSystemOperation(
123 const FileSystemURL& url, 123 const FileSystemURL& url,
124 FileSystemContext* context, 124 FileSystemContext* context,
125 base::PlatformFileError* error_code) const { 125 base::PlatformFileError* error_code) const {
126 scoped_ptr<FileSystemOperationContext> operation_context( 126 scoped_ptr<FileSystemOperationContext> operation_context(
127 new FileSystemOperationContext(context)); 127 new FileSystemOperationContext(context));
128 operation_context->set_update_observers(observers_); 128 operation_context->set_update_observers(observers_);
129 return new LocalFileSystemOperation(context, operation_context.Pass()); 129 return new LocalFileSystemOperation(context, operation_context.Pass());
(...skipping 29 matching lines...) Expand all
159 NOTREACHED(); 159 NOTREACHED();
160 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); 160 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
161 } 161 }
162 162
163 const UpdateObserverList* TestMountPointProvider::GetUpdateObservers( 163 const UpdateObserverList* TestMountPointProvider::GetUpdateObservers(
164 FileSystemType type) const { 164 FileSystemType type) const {
165 return &observers_; 165 return &observers_;
166 } 166 }
167 167
168 } // namespace fileapi 168 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/test_mount_point_provider.h ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698