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/chromeos/fileapi/cros_mount_point_provider.h" | 5 #include "webkit/browser/chromeos/fileapi/cros_mount_point_provider.h" |
6 | 6 |
7 #include "base/chromeos/chromeos_version.h" | 7 #include "base/chromeos/chromeos_version.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 229 } |
230 | 230 |
231 fileapi::CopyOrMoveFileValidatorFactory* | 231 fileapi::CopyOrMoveFileValidatorFactory* |
232 CrosMountPointProvider::GetCopyOrMoveFileValidatorFactory( | 232 CrosMountPointProvider::GetCopyOrMoveFileValidatorFactory( |
233 fileapi::FileSystemType type, base::PlatformFileError* error_code) { | 233 fileapi::FileSystemType type, base::PlatformFileError* error_code) { |
234 DCHECK(error_code); | 234 DCHECK(error_code); |
235 *error_code = base::PLATFORM_FILE_OK; | 235 *error_code = base::PLATFORM_FILE_OK; |
236 return NULL; | 236 return NULL; |
237 } | 237 } |
238 | 238 |
239 void CrosMountPointProvider::InitializeCopyOrMoveFileValidatorFactory( | |
240 fileapi::FileSystemType type, | |
241 scoped_ptr<fileapi::CopyOrMoveFileValidatorFactory> factory) { | |
242 DCHECK(!factory); | |
243 } | |
244 | |
245 fileapi::FilePermissionPolicy CrosMountPointProvider::GetPermissionPolicy( | 239 fileapi::FilePermissionPolicy CrosMountPointProvider::GetPermissionPolicy( |
246 const fileapi::FileSystemURL& url, int permissions) const { | 240 const fileapi::FileSystemURL& url, int permissions) const { |
247 if (url.type() == fileapi::kFileSystemTypeRestrictedNativeLocal && | 241 if (url.type() == fileapi::kFileSystemTypeRestrictedNativeLocal && |
248 (permissions & ~fileapi::kReadFilePermissions)) { | 242 (permissions & ~fileapi::kReadFilePermissions)) { |
249 // Restricted file system is read-only. | 243 // Restricted file system is read-only. |
250 return fileapi::FILE_PERMISSION_ALWAYS_DENY; | 244 return fileapi::FILE_PERMISSION_ALWAYS_DENY; |
251 } | 245 } |
252 | 246 |
253 if (!IsAccessAllowed(url)) | 247 if (!IsAccessAllowed(url)) |
254 return fileapi::FILE_PERMISSION_ALWAYS_DENY; | 248 return fileapi::FILE_PERMISSION_ALWAYS_DENY; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 fileapi::RemoteFileSystemProxyInterface* CrosMountPointProvider::GetRemoteProxy( | 343 fileapi::RemoteFileSystemProxyInterface* CrosMountPointProvider::GetRemoteProxy( |
350 const std::string& mount_name) const { | 344 const std::string& mount_name) const { |
351 fileapi::RemoteFileSystemProxyInterface* proxy = | 345 fileapi::RemoteFileSystemProxyInterface* proxy = |
352 mount_points_->GetRemoteFileSystemProxy(mount_name); | 346 mount_points_->GetRemoteFileSystemProxy(mount_name); |
353 if (proxy) | 347 if (proxy) |
354 return proxy; | 348 return proxy; |
355 return system_mount_points_->GetRemoteFileSystemProxy(mount_name); | 349 return system_mount_points_->GetRemoteFileSystemProxy(mount_name); |
356 } | 350 } |
357 | 351 |
358 } // namespace chromeos | 352 } // namespace chromeos |
OLD | NEW |