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/fileapi/isolated_mount_point_provider.h" | 5 #include "webkit/fileapi/isolated_mount_point_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 bool IsolatedMountPointProvider::IsRestrictedFileName( | 95 bool IsolatedMountPointProvider::IsRestrictedFileName( |
96 const FilePath& filename) const { | 96 const FilePath& filename) const { |
97 // TODO(kinuko): We need to check platform-specific restricted file names | 97 // TODO(kinuko): We need to check platform-specific restricted file names |
98 // before we actually start allowing file creation in isolated file systems. | 98 // before we actually start allowing file creation in isolated file systems. |
99 return false; | 99 return false; |
100 } | 100 } |
101 | 101 |
102 FileSystemFileUtil* IsolatedMountPointProvider::GetFileUtil( | 102 FileSystemFileUtil* IsolatedMountPointProvider::GetFileUtil( |
103 FileSystemType type) { | 103 FileSystemType type) { |
104 switch (type) { | 104 switch (type) { |
105 case kFileSystemTypeIsolated: | |
106 case kFileSystemTypeNativeLocal: | 105 case kFileSystemTypeNativeLocal: |
107 return isolated_file_util_.get(); | 106 return isolated_file_util_.get(); |
108 case kFileSystemTypeDragged: | 107 case kFileSystemTypeDragged: |
109 return dragged_file_util_.get(); | 108 return dragged_file_util_.get(); |
110 case kFileSystemTypeNativeMedia: | 109 case kFileSystemTypeNativeMedia: |
111 return native_media_file_util_.get(); | 110 return native_media_file_util_.get(); |
112 case kFileSystemTypeDeviceMedia: | 111 case kFileSystemTypeDeviceMedia: |
113 #if defined(SUPPORT_MEDIA_FILESYSTEM) | 112 #if defined(SUPPORT_MEDIA_FILESYSTEM) |
114 return device_media_file_util_.get(); | 113 return device_media_file_util_.get(); |
115 #endif | 114 #endif |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 void IsolatedMountPointProvider::DeleteFileSystem( | 173 void IsolatedMountPointProvider::DeleteFileSystem( |
175 const GURL& origin_url, | 174 const GURL& origin_url, |
176 FileSystemType type, | 175 FileSystemType type, |
177 FileSystemContext* context, | 176 FileSystemContext* context, |
178 const DeleteFileSystemCallback& callback) { | 177 const DeleteFileSystemCallback& callback) { |
179 NOTREACHED(); | 178 NOTREACHED(); |
180 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); | 179 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); |
181 } | 180 } |
182 | 181 |
183 } // namespace fileapi | 182 } // namespace fileapi |
OLD | NEW |