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 WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/files/file_util_proxy.h" | 12 #include "base/files/file_util_proxy.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
16 #include "webkit/browser/fileapi/file_system_file_util.h" | 16 #include "webkit/browser/fileapi/file_system_file_util.h" |
17 #include "webkit/browser/fileapi/file_system_url.h" | 17 #include "webkit/browser/fileapi/file_system_url.h" |
18 #include "webkit/browser/fileapi/sandbox_directory_database.h" | 18 #include "webkit/browser/fileapi/sandbox_directory_database.h" |
| 19 #include "webkit/browser/webkit_storage_browser_export.h" |
19 #include "webkit/common/blob/shareable_file_reference.h" | 20 #include "webkit/common/blob/shareable_file_reference.h" |
20 #include "webkit/common/fileapi/file_system_types.h" | 21 #include "webkit/common/fileapi/file_system_types.h" |
21 #include "webkit/storage/webkit_storage_export.h" | |
22 | 22 |
23 namespace base { | 23 namespace base { |
24 class SequencedTaskRunner; | 24 class SequencedTaskRunner; |
25 class TimeTicks; | 25 class TimeTicks; |
26 } | 26 } |
27 | 27 |
28 namespace quota { | 28 namespace quota { |
29 class SpecialStoragePolicy; | 29 class SpecialStoragePolicy; |
30 } | 30 } |
31 | 31 |
32 class GURL; | 32 class GURL; |
33 | 33 |
34 namespace fileapi { | 34 namespace fileapi { |
35 | 35 |
36 class FileSystemOperationContext; | 36 class FileSystemOperationContext; |
37 class SandboxOriginDatabaseInterface; | 37 class SandboxOriginDatabaseInterface; |
38 | 38 |
39 // The overall implementation philosophy of this class is that partial failures | 39 // The overall implementation philosophy of this class is that partial failures |
40 // should leave us with an intact database; we'd prefer to leak the occasional | 40 // should leave us with an intact database; we'd prefer to leak the occasional |
41 // backing file than have a database entry whose backing file is missing. When | 41 // backing file than have a database entry whose backing file is missing. When |
42 // doing FSCK operations, if you find a loose backing file with no reference, | 42 // doing FSCK operations, if you find a loose backing file with no reference, |
43 // you may safely delete it. | 43 // you may safely delete it. |
44 // | 44 // |
45 // This class must be deleted on the FILE thread, because that's where | 45 // This class must be deleted on the FILE thread, because that's where |
46 // DropDatabases needs to be called. | 46 // DropDatabases needs to be called. |
47 class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil | 47 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE ObfuscatedFileUtil |
48 : public FileSystemFileUtil { | 48 : public FileSystemFileUtil { |
49 public: | 49 public: |
50 // Origin enumerator interface. | 50 // Origin enumerator interface. |
51 // An instance of this interface is assumed to be called on the file thread. | 51 // An instance of this interface is assumed to be called on the file thread. |
52 class AbstractOriginEnumerator { | 52 class AbstractOriginEnumerator { |
53 public: | 53 public: |
54 virtual ~AbstractOriginEnumerator() {} | 54 virtual ~AbstractOriginEnumerator() {} |
55 | 55 |
56 // Returns the next origin. Returns empty if there are no more origins. | 56 // Returns the next origin. Returns empty if there are no more origins. |
57 virtual GURL Next() = 0; | 57 virtual GURL Next() = 0; |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 // If this instance is initialized for an isolated partition, this should | 288 // If this instance is initialized for an isolated partition, this should |
289 // only see a single origin. | 289 // only see a single origin. |
290 GURL isolated_origin_; | 290 GURL isolated_origin_; |
291 | 291 |
292 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); | 292 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); |
293 }; | 293 }; |
294 | 294 |
295 } // namespace fileapi | 295 } // namespace fileapi |
296 | 296 |
297 #endif // WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 297 #endif // WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
OLD | NEW |