| 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::OpenFileSystem( | 106 void MediaFileSystemBackend::InitializeFileSystem( |
| 107 const GURL& origin_url, | 107 const GURL& origin_url, |
| 108 fileapi::FileSystemType type, | 108 fileapi::FileSystemType type, |
| 109 fileapi::OpenFileSystemMode mode, | 109 fileapi::OpenFileSystemMode mode, |
| 110 const OpenFileSystemCallback& callback) { | 110 fileapi::FileSystemContext* context, |
| 111 const InitializeFileSystemCallback& callback) { |
| 111 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. | 112 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. |
| 112 base::MessageLoopProxy::current()->PostTask( | 113 base::MessageLoopProxy::current()->PostTask( |
| 113 FROM_HERE, | 114 FROM_HERE, |
| 114 base::Bind(callback, | 115 base::Bind(callback, |
| 115 GetFileSystemRootURI(origin_url, type), | 116 GetFileSystemRootURI(origin_url, type), |
| 116 GetFileSystemName(origin_url, type), | 117 GetFileSystemName(origin_url, type), |
| 117 base::PLATFORM_FILE_ERROR_SECURITY)); | 118 base::PLATFORM_FILE_ERROR_SECURITY)); |
| 118 } | 119 } |
| 119 | 120 |
| 120 fileapi::FileSystemFileUtil* MediaFileSystemBackend::GetFileUtil( | 121 fileapi::FileSystemFileUtil* MediaFileSystemBackend::GetFileUtil( |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 url.path(), offset)); | 206 url.path(), offset)); |
| 206 } | 207 } |
| 207 | 208 |
| 208 fileapi::FileSystemQuotaUtil* | 209 fileapi::FileSystemQuotaUtil* |
| 209 MediaFileSystemBackend::GetQuotaUtil() { | 210 MediaFileSystemBackend::GetQuotaUtil() { |
| 210 // No quota support. | 211 // No quota support. |
| 211 return NULL; | 212 return NULL; |
| 212 } | 213 } |
| 213 | 214 |
| 214 } // namespace chrome | 215 } // namespace chrome |
| OLD | NEW |