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_file_system_backend.h" | 5 #include "webkit/browser/fileapi/isolated_file_system_backend.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 void IsolatedFileSystemBackend::InitializeFileSystem( | 59 void IsolatedFileSystemBackend::Initialize(FileSystemContext* context) { |
| 60 } |
| 61 |
| 62 void IsolatedFileSystemBackend::OpenFileSystem( |
60 const GURL& origin_url, | 63 const GURL& origin_url, |
61 FileSystemType type, | 64 FileSystemType type, |
62 OpenFileSystemMode mode, | 65 OpenFileSystemMode mode, |
63 FileSystemContext* context, | 66 const OpenFileSystemCallback& callback) { |
64 const InitializeFileSystemCallback& callback) { | |
65 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. | 67 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. |
66 base::MessageLoopProxy::current()->PostTask( | 68 base::MessageLoopProxy::current()->PostTask( |
67 FROM_HERE, | 69 FROM_HERE, |
68 base::Bind(callback, | 70 base::Bind(callback, |
69 GetFileSystemRootURI(origin_url, type), | 71 GetFileSystemRootURI(origin_url, type), |
70 GetFileSystemName(origin_url, type), | 72 GetFileSystemName(origin_url, type), |
71 base::PLATFORM_FILE_ERROR_SECURITY)); | 73 base::PLATFORM_FILE_ERROR_SECURITY)); |
72 } | 74 } |
73 | 75 |
74 FileSystemFileUtil* IsolatedFileSystemBackend::GetFileUtil( | 76 FileSystemFileUtil* IsolatedFileSystemBackend::GetFileUtil( |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 return scoped_ptr<FileStreamWriter>(new LocalFileStreamWriter( | 138 return scoped_ptr<FileStreamWriter>(new LocalFileStreamWriter( |
137 context->task_runners()->file_task_runner(), url.path(), offset)); | 139 context->task_runners()->file_task_runner(), url.path(), offset)); |
138 } | 140 } |
139 | 141 |
140 FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() { | 142 FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() { |
141 // No quota support. | 143 // No quota support. |
142 return NULL; | 144 return NULL; |
143 } | 145 } |
144 | 146 |
145 } // namespace fileapi | 147 } // namespace fileapi |
OLD | NEW |