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 STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
6 #define STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 6 #define STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // regular sandbox filesystems. | 61 // regular sandbox filesystems. |
62 // | 62 // |
63 // The overall implementation philosophy of this class is that partial failures | 63 // The overall implementation philosophy of this class is that partial failures |
64 // should leave us with an intact database; we'd prefer to leak the occasional | 64 // should leave us with an intact database; we'd prefer to leak the occasional |
65 // backing file than have a database entry whose backing file is missing. When | 65 // backing file than have a database entry whose backing file is missing. When |
66 // doing FSCK operations, if you find a loose backing file with no reference, | 66 // doing FSCK operations, if you find a loose backing file with no reference, |
67 // you may safely delete it. | 67 // you may safely delete it. |
68 // | 68 // |
69 // This class must be deleted on the FILE thread, because that's where | 69 // This class must be deleted on the FILE thread, because that's where |
70 // DropDatabases needs to be called. | 70 // DropDatabases needs to be called. |
71 class STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil | 71 class STORAGE_EXPORT ObfuscatedFileUtil : public FileSystemFileUtil { |
72 : public FileSystemFileUtil { | |
73 public: | 72 public: |
74 // Origin enumerator interface. | 73 // Origin enumerator interface. |
75 // An instance of this interface is assumed to be called on the file thread. | 74 // An instance of this interface is assumed to be called on the file thread. |
76 class AbstractOriginEnumerator { | 75 class AbstractOriginEnumerator { |
77 public: | 76 public: |
78 virtual ~AbstractOriginEnumerator() {} | 77 virtual ~AbstractOriginEnumerator() {} |
79 | 78 |
80 // Returns the next origin. Returns empty if there are no more origins. | 79 // Returns the next origin. Returns empty if there are no more origins. |
81 virtual GURL Next() = 0; | 80 virtual GURL Next() = 0; |
82 | 81 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 342 |
344 // Not owned. | 343 // Not owned. |
345 SandboxFileSystemBackendDelegate* sandbox_delegate_; | 344 SandboxFileSystemBackendDelegate* sandbox_delegate_; |
346 | 345 |
347 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); | 346 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); |
348 }; | 347 }; |
349 | 348 |
350 } // namespace storage | 349 } // namespace storage |
351 | 350 |
352 #endif // STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 351 #endif // STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
OLD | NEW |