Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: webkit/fileapi/obfuscated_file_system_file_util.h

Issue 7174002: Change {Obfuscated|Local}FileSystemFileUtil non-Singleton to take an underlying *FileUtil. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unnecessary lines from ChromeOS code. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SYSTEM_FILE_UTIL_H_ 5 #ifndef WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_
6 #define WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ 6 #define WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 30 matching lines...) Expand all
41 // SandboxMountPointProvider [and the task it uses to drop the reference] and 41 // SandboxMountPointProvider [and the task it uses to drop the reference] and
42 // SandboxMountPointProvider::GetFileSystemRootPathTask. Without that last one, 42 // SandboxMountPointProvider::GetFileSystemRootPathTask. Without that last one,
43 // we wouldn't need ref counting. 43 // we wouldn't need ref counting.
44 // 44 //
45 // TODO(ericu): We don't ever update directory mtimes; which operations should 45 // TODO(ericu): We don't ever update directory mtimes; which operations should
46 // do that? 46 // do that?
47 class ObfuscatedFileSystemFileUtil : public FileSystemFileUtil, 47 class ObfuscatedFileSystemFileUtil : public FileSystemFileUtil,
48 public base::RefCountedThreadSafe<ObfuscatedFileSystemFileUtil> { 48 public base::RefCountedThreadSafe<ObfuscatedFileSystemFileUtil> {
49 public: 49 public:
50 50
51 ObfuscatedFileSystemFileUtil(const FilePath& file_system_directory); 51 ObfuscatedFileSystemFileUtil(
52 const FilePath& file_system_directory,
53 FileSystemFileUtil* underlying_file_util);
52 virtual ~ObfuscatedFileSystemFileUtil(); 54 virtual ~ObfuscatedFileSystemFileUtil();
53 55
54 virtual base::PlatformFileError CreateOrOpen( 56 virtual base::PlatformFileError CreateOrOpen(
55 FileSystemOperationContext* context, 57 FileSystemOperationContext* context,
56 const FilePath& file_path, 58 const FilePath& file_path,
57 int file_flags, 59 int file_flags,
58 base::PlatformFile* file_handle, 60 base::PlatformFile* file_handle,
59 bool* created) OVERRIDE; 61 bool* created) OVERRIDE;
60 62
61 virtual base::PlatformFileError EnsureFileExists( 63 virtual base::PlatformFileError EnsureFileExists(
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void MarkUsed(); 219 void MarkUsed();
218 void DropDatabases(); 220 void DropDatabases();
219 bool DestroyDirectoryDatabase(const GURL& origin, FileSystemType type); 221 bool DestroyDirectoryDatabase(const GURL& origin, FileSystemType type);
220 bool InitOriginDatabase(bool create); 222 bool InitOriginDatabase(bool create);
221 223
222 typedef std::map<std::string, FileSystemDirectoryDatabase*> DirectoryMap; 224 typedef std::map<std::string, FileSystemDirectoryDatabase*> DirectoryMap;
223 DirectoryMap directories_; 225 DirectoryMap directories_;
224 scoped_ptr<FileSystemOriginDatabase> origin_database_; 226 scoped_ptr<FileSystemOriginDatabase> origin_database_;
225 FilePath file_system_directory_; 227 FilePath file_system_directory_;
226 base::OneShotTimer<ObfuscatedFileSystemFileUtil> timer_; 228 base::OneShotTimer<ObfuscatedFileSystemFileUtil> timer_;
229 FileSystemFileUtil* underlying_file_util_;
227 230
228 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileSystemFileUtil); 231 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileSystemFileUtil);
229 }; 232 };
230 233
231 } // namespace fileapi 234 } // namespace fileapi
232 235
233 #endif // WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ 236 #endif // WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698