OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 5 #include "chrome/browser/media_galleries/fileapi/media_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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #if defined(OS_WIN) || defined(OS_MACOSX) | 96 #if defined(OS_WIN) || defined(OS_MACOSX) |
97 case fileapi::kFileSystemTypePicasa: | 97 case fileapi::kFileSystemTypePicasa: |
98 case fileapi::kFileSystemTypeItunes: | 98 case fileapi::kFileSystemTypeItunes: |
99 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 99 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
100 return true; | 100 return true; |
101 default: | 101 default: |
102 return false; | 102 return false; |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 void MediaFileSystemBackend::InitializeFileSystem( | 106 void MediaFileSystemBackend::Initialize(fileapi::FileSystemContext* context) { |
| 107 } |
| 108 |
| 109 void MediaFileSystemBackend::OpenFileSystem( |
107 const GURL& origin_url, | 110 const GURL& origin_url, |
108 fileapi::FileSystemType type, | 111 fileapi::FileSystemType type, |
109 fileapi::OpenFileSystemMode mode, | 112 fileapi::OpenFileSystemMode mode, |
110 fileapi::FileSystemContext* context, | 113 const OpenFileSystemCallback& callback) { |
111 const InitializeFileSystemCallback& callback) { | |
112 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. | 114 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. |
113 base::MessageLoopProxy::current()->PostTask( | 115 base::MessageLoopProxy::current()->PostTask( |
114 FROM_HERE, | 116 FROM_HERE, |
115 base::Bind(callback, | 117 base::Bind(callback, |
116 GetFileSystemRootURI(origin_url, type), | 118 GetFileSystemRootURI(origin_url, type), |
117 GetFileSystemName(origin_url, type), | 119 GetFileSystemName(origin_url, type), |
118 base::PLATFORM_FILE_ERROR_SECURITY)); | 120 base::PLATFORM_FILE_ERROR_SECURITY)); |
119 } | 121 } |
120 | 122 |
121 fileapi::FileSystemFileUtil* MediaFileSystemBackend::GetFileUtil( | 123 fileapi::FileSystemFileUtil* MediaFileSystemBackend::GetFileUtil( |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 url.path(), offset)); | 208 url.path(), offset)); |
207 } | 209 } |
208 | 210 |
209 fileapi::FileSystemQuotaUtil* | 211 fileapi::FileSystemQuotaUtil* |
210 MediaFileSystemBackend::GetQuotaUtil() { | 212 MediaFileSystemBackend::GetQuotaUtil() { |
211 // No quota support. | 213 // No quota support. |
212 return NULL; | 214 return NULL; |
213 } | 215 } |
214 | 216 |
215 } // namespace chrome | 217 } // namespace chrome |
OLD | NEW |