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

Unified Diff: webkit/fileapi/file_system_quota_unittest.cc

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: Fixed memery leak at LocalFSFUTest, and rebased. 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 side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/file_system_quota_unittest.cc
diff --git a/webkit/fileapi/file_system_quota_unittest.cc b/webkit/fileapi/file_system_quota_unittest.cc
index dbbef66dd79f2ba017ec765f59a89b8cfaee9ba4..9978d4b989a9891ce4ae9b12867b6e787134861f 100644
--- a/webkit/fileapi/file_system_quota_unittest.cc
+++ b/webkit/fileapi/file_system_quota_unittest.cc
@@ -21,6 +21,7 @@
#include "webkit/fileapi/file_system_usage_cache.h"
#include "webkit/fileapi/file_system_util.h"
#include "webkit/fileapi/local_file_system_file_util.h"
+#include "webkit/fileapi/quota_file_util.h"
#include "webkit/quota/quota_manager.h"
namespace fileapi {
@@ -118,6 +119,7 @@ class FileSystemQuotaTest : public testing::Test {
ScopedTempDir work_dir_;
scoped_refptr<quota::QuotaManager> quota_manager_;
+ scoped_ptr<LocalFileSystemFileUtil> local_file_util_;
base::ScopedCallbackFactory<FileSystemQuotaTest> callback_factory_;
@@ -186,16 +188,19 @@ void FileSystemQuotaTest::SetUp() {
base::MessageLoopProxy::CreateForCurrentThread(),
NULL);
+ local_file_util_.reset(
+ new LocalFileSystemFileUtil(QuotaFileUtil::GetInstance()));
test_helper_.SetUp(filesystem_dir_path,
false /* incognito */,
false /* unlimited quota */,
quota_manager_->proxy(),
- LocalFileSystemFileUtil::GetInstance());
+ local_file_util_.get());
}
void FileSystemQuotaTest::TearDown() {
quota_manager_ = NULL;
test_helper_.TearDown();
+ local_file_util_.reset();
ericu 2011/06/17 20:32:07 Clearing member scoped_ptrs shouldn't be necessary
Dai Mikurube (NOT FULLTIME) 2011/06/23 08:13:32 Done. local_file_util_ can be instanciated before
}
FileSystemOperation* FileSystemQuotaTest::operation() {

Powered by Google App Engine
This is Rietveld 408576698