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

Unified Diff: webkit/fileapi/obfuscated_file_system_file_util.h

Issue 7312023: Refactoring: Change all -FileUtils non-Singleton and to own underlying FileUtils. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Reflected the comments. Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/obfuscated_file_system_file_util.h
diff --git a/webkit/fileapi/obfuscated_file_system_file_util.h b/webkit/fileapi/obfuscated_file_system_file_util.h
index 966a4c3ca25219f554543464181d5a2aaeee3a41..063fcd5a48f284637fb20a18378abf391123c16a 100644
--- a/webkit/fileapi/obfuscated_file_system_file_util.h
+++ b/webkit/fileapi/obfuscated_file_system_file_util.h
@@ -47,8 +47,10 @@ class FileSystemOperationContext;
class ObfuscatedFileSystemFileUtil : public FileSystemFileUtil,
public base::RefCountedThreadSafe<ObfuscatedFileSystemFileUtil> {
public:
- // |underlying_file_util| is not owned by the instance. It will need to be
- // a singleton or to be deleted by someone else.
+ // |underlying_file_util| is owned by the instance. It will be deleted by
+ // the owner instance. For example, it can be instanciated as follows:
+ // FileSystemFileUtil* file_system_file_util =
+ // new ObfuscatedFileSystemFileUtil(new FileSystemFileUtil());
ObfuscatedFileSystemFileUtil(
const FilePath& file_system_directory,
FileSystemFileUtil* underlying_file_util);
@@ -244,7 +246,7 @@ class ObfuscatedFileSystemFileUtil : public FileSystemFileUtil,
scoped_ptr<FileSystemOriginDatabase> origin_database_;
FilePath file_system_directory_;
base::OneShotTimer<ObfuscatedFileSystemFileUtil> timer_;
- FileSystemFileUtil* underlying_file_util_;
+ scoped_ptr<FileSystemFileUtil> underlying_file_util_;
DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileSystemFileUtil);
};
« no previous file with comments | « webkit/fileapi/local_file_system_file_util_unittest.cc ('k') | webkit/fileapi/obfuscated_file_system_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698