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 #ifndef CONTENT_BROWSER_FILEAPI_BROWSER_FILE_SYSTEM_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_FILEAPI_BROWSER_FILE_SYSTEM_HELPER_H_ |
6 #define CONTENT_BROWSER_FILEAPI_BROWSER_FILE_SYSTEM_HELPER_H_ | 6 #define CONTENT_BROWSER_FILEAPI_BROWSER_FILE_SYSTEM_HELPER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "storage/browser/fileapi/file_system_context.h" | 10 #include "storage/browser/fileapi/file_system_context.h" |
11 | 11 |
12 namespace storage { | 12 namespace storage { |
13 class ExternalMountPoints; | |
14 class FileSystemContext; | 13 class FileSystemContext; |
15 class FileSystemURL; | 14 class FileSystemURL; |
16 } | 15 } |
17 | 16 |
18 namespace content { | 17 namespace content { |
19 | 18 |
20 class BrowserContext; | 19 class BrowserContext; |
21 | 20 |
22 // Helper method that returns FileSystemContext constructed for | 21 // Helper method that returns FileSystemContext constructed for |
23 // the browser process. | 22 // the browser process. |
24 CONTENT_EXPORT scoped_refptr<storage::FileSystemContext> | 23 CONTENT_EXPORT scoped_refptr<storage::FileSystemContext> |
25 CreateFileSystemContext(BrowserContext* browser_context, | 24 CreateFileSystemContext(BrowserContext* browser_context, |
26 const base::FilePath& profile_path, | 25 const base::FilePath& profile_path, |
27 bool is_incognito, | 26 bool is_incognito, |
28 storage::QuotaManagerProxy* quota_manager_proxy); | 27 storage::QuotaManagerProxy* quota_manager_proxy); |
29 | 28 |
30 // Verifies that |url| is valid and has a registered backend in |context|. | 29 // Verifies that |url| is valid and has a registered backend in |context|. |
31 CONTENT_EXPORT bool FileSystemURLIsValid(storage::FileSystemContext* context, | 30 CONTENT_EXPORT bool FileSystemURLIsValid(storage::FileSystemContext* context, |
32 const storage::FileSystemURL& url); | 31 const storage::FileSystemURL& url); |
33 | 32 |
34 // Get the platform path from a file system URL. This needs to be called | 33 // Get the platform path from a file system URL. This needs to be called |
35 // on the FILE thread. | 34 // on the FILE thread. |
36 CONTENT_EXPORT void SyncGetPlatformPath(storage::FileSystemContext* context, | 35 CONTENT_EXPORT void SyncGetPlatformPath(storage::FileSystemContext* context, |
37 int process_id, | 36 int process_id, |
38 const GURL& path, | 37 const GURL& path, |
39 base::FilePath* platform_path); | 38 base::FilePath* platform_path); |
40 } // namespace content | 39 } // namespace content |
41 | 40 |
42 #endif // CONTENT_BROWSER_FILEAPI_BROWSER_FILE_SYSTEM_HELPER_H_ | 41 #endif // CONTENT_BROWSER_FILEAPI_BROWSER_FILE_SYSTEM_HELPER_H_ |
OLD | NEW |