OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
6 #define WEBKIT_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 6 #define WEBKIT_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 24 matching lines...) Expand all Loading... |
35 // backing file than have a database entry whose backing file is missing. When | 35 // backing file than have a database entry whose backing file is missing. When |
36 // doing FSCK operations, if you find a loose backing file with no reference, | 36 // doing FSCK operations, if you find a loose backing file with no reference, |
37 // you may safely delete it. | 37 // you may safely delete it. |
38 // | 38 // |
39 // This class is RefCountedThreadSafe because it may gain a reference on the IO | 39 // This class is RefCountedThreadSafe because it may gain a reference on the IO |
40 // thread, but must be deleted on the FILE thread because that's where | 40 // thread, but must be deleted on the FILE thread because that's where |
41 // DropDatabases needs to be called. References will be held by the | 41 // DropDatabases needs to be called. References will be held by the |
42 // SandboxMountPointProvider [and the task it uses to drop the reference] and | 42 // SandboxMountPointProvider [and the task it uses to drop the reference] and |
43 // SandboxMountPointProvider::GetFileSystemRootPathTask. Without that last one, | 43 // SandboxMountPointProvider::GetFileSystemRootPathTask. Without that last one, |
44 // we wouldn't need ref counting. | 44 // we wouldn't need ref counting. |
45 // | |
46 // TODO(ericu): We don't ever update directory mtimes; which operations should | |
47 // do that? | |
48 class ObfuscatedFileUtil : public FileSystemFileUtil, | 45 class ObfuscatedFileUtil : public FileSystemFileUtil, |
49 public base::RefCountedThreadSafe<ObfuscatedFileUtil> { | 46 public base::RefCountedThreadSafe<ObfuscatedFileUtil> { |
50 public: | 47 public: |
51 // Origin enumerator interface. | 48 // Origin enumerator interface. |
52 // An instance of this interface is assumed to be called on the file thread. | 49 // An instance of this interface is assumed to be called on the file thread. |
53 class AbstractOriginEnumerator { | 50 class AbstractOriginEnumerator { |
54 public: | 51 public: |
55 virtual ~AbstractOriginEnumerator() {} | 52 virtual ~AbstractOriginEnumerator() {} |
56 | 53 |
57 // Returns the next origin. Returns empty if there are no more origins. | 54 // Returns the next origin. Returns empty if there are no more origins. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 scoped_ptr<FileSystemOriginDatabase> origin_database_; | 256 scoped_ptr<FileSystemOriginDatabase> origin_database_; |
260 FilePath file_system_directory_; | 257 FilePath file_system_directory_; |
261 base::OneShotTimer<ObfuscatedFileUtil> timer_; | 258 base::OneShotTimer<ObfuscatedFileUtil> timer_; |
262 | 259 |
263 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); | 260 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); |
264 }; | 261 }; |
265 | 262 |
266 } // namespace fileapi | 263 } // namespace fileapi |
267 | 264 |
268 #endif // WEBKIT_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 265 #endif // WEBKIT_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
OLD | NEW |