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

Unified Diff: webkit/fileapi/local_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: Rebased. 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
« no previous file with comments | « webkit/fileapi/file_system_test_helper.cc ('k') | webkit/fileapi/local_file_system_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/local_file_system_file_util.h
diff --git a/webkit/fileapi/local_file_system_file_util.h b/webkit/fileapi/local_file_system_file_util.h
index 8b18f68e4e8bfd0588d74c84cae5264b9d3239a3..6d9ef742eb62c59329db2e08a220571e7cdca981 100644
--- a/webkit/fileapi/local_file_system_file_util.h
+++ b/webkit/fileapi/local_file_system_file_util.h
@@ -12,10 +12,7 @@
#include "base/file_util.h"
#include "base/file_util_proxy.h"
#include "base/logging.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/singleton.h"
#include "base/platform_file.h"
-#include "base/tracked_objects.h"
#include "webkit/fileapi/file_system_file_util.h"
#include "webkit/fileapi/file_system_types.h"
@@ -34,9 +31,12 @@ using base::PlatformFileError;
class FileSystemOperationContext;
+// An instance of this class is created and owned by *MountPointProvider.
class LocalFileSystemFileUtil : public FileSystemFileUtil {
public:
- static LocalFileSystemFileUtil* GetInstance();
+ // |underlying_file_util| is not owned by the instance. It will need to be
+ // a singleton or to be deleted by someone else.
+ explicit LocalFileSystemFileUtil(FileSystemFileUtil* underlying_file_util);
virtual PlatformFileError CreateOrOpen(
FileSystemOperationContext* context,
@@ -117,12 +117,6 @@ class LocalFileSystemFileUtil : public FileSystemFileUtil {
FileSystemOperationContext* context,
const FilePath& root_path);
- protected:
- LocalFileSystemFileUtil() { }
-
- friend struct DefaultSingletonTraits<LocalFileSystemFileUtil>;
- DISALLOW_COPY_AND_ASSIGN(LocalFileSystemFileUtil);
-
private:
// Given the filesystem's root URL and a virtual path, produces a real, full
// local path.
@@ -131,6 +125,10 @@ class LocalFileSystemFileUtil : public FileSystemFileUtil {
const GURL& origin_url,
FileSystemType type,
const FilePath& virtual_path);
+
+ FileSystemFileUtil* underlying_file_util_;
+
+ DISALLOW_COPY_AND_ASSIGN(LocalFileSystemFileUtil);
};
} // namespace fileapi
« no previous file with comments | « webkit/fileapi/file_system_test_helper.cc ('k') | webkit/fileapi/local_file_system_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698