| 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/fileapi/isolated_mount_point_provider.h" | 5 #include "webkit/browser/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/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #if !defined(OS_CHROMEOS) | 49 #if !defined(OS_CHROMEOS) |
| 50 case kFileSystemTypeNativeLocal: | 50 case kFileSystemTypeNativeLocal: |
| 51 case kFileSystemTypeNativeForPlatformApp: | 51 case kFileSystemTypeNativeForPlatformApp: |
| 52 return true; | 52 return true; |
| 53 #endif | 53 #endif |
| 54 default: | 54 default: |
| 55 return false; | 55 return false; |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 GURL IsolatedMountPointProvider::GetRootURI(const GURL& origin_url, |
| 60 FileSystemType type) const { |
| 61 if (!CanHandleType(type)) |
| 62 return GURL(); |
| 63 return GetFileSystemRootURI(origin_url, type); |
| 64 } |
| 65 |
| 59 void IsolatedMountPointProvider::OpenFileSystem( | 66 void IsolatedMountPointProvider::OpenFileSystem( |
| 60 const GURL& origin_url, | 67 const GURL& origin_url, |
| 61 FileSystemType type, | 68 FileSystemType type, |
| 62 OpenFileSystemMode mode, | 69 OpenFileSystemMode mode, |
| 63 const OpenFileSystemCallback& callback) { | 70 const OpenFileSystemCallback& callback) { |
| 64 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. | 71 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. |
| 65 base::MessageLoopProxy::current()->PostTask( | 72 base::MessageLoopProxy::current()->PostTask( |
| 66 FROM_HERE, | 73 FROM_HERE, |
| 67 base::Bind(callback, base::PLATFORM_FILE_ERROR_SECURITY)); | 74 base::Bind(callback, base::PLATFORM_FILE_ERROR_SECURITY)); |
| 68 } | 75 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 FileSystemContext* context) const { | 138 FileSystemContext* context) const { |
| 132 return scoped_ptr<FileStreamWriter>(new LocalFileStreamWriter( | 139 return scoped_ptr<FileStreamWriter>(new LocalFileStreamWriter( |
| 133 context->task_runners()->file_task_runner(), url.path(), offset)); | 140 context->task_runners()->file_task_runner(), url.path(), offset)); |
| 134 } | 141 } |
| 135 | 142 |
| 136 FileSystemQuotaUtil* IsolatedMountPointProvider::GetQuotaUtil() { | 143 FileSystemQuotaUtil* IsolatedMountPointProvider::GetQuotaUtil() { |
| 137 // No quota support. | 144 // No quota support. |
| 138 return NULL; | 145 return NULL; |
| 139 } | 146 } |
| 140 | 147 |
| 148 const UpdateObserverList* |
| 149 IsolatedMountPointProvider::GetUpdateObservers(FileSystemType type) const { |
| 150 // No update observer support. |
| 151 return NULL; |
| 152 } |
| 153 |
| 141 } // namespace fileapi | 154 } // namespace fileapi |
| OLD | NEW |