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

Unified Diff: webkit/fileapi/obfuscated_file_util_unittest.cc

Issue 8070001: Use base::Callback in Quota related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 2 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_quota_unittest.cc ('k') | webkit/quota/mock_quota_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/obfuscated_file_util_unittest.cc
diff --git a/webkit/fileapi/obfuscated_file_util_unittest.cc b/webkit/fileapi/obfuscated_file_util_unittest.cc
index 3881370c52bda5b98a709b32c09e8c125590017d..75ba9568e8cf9d60c1d78cb705ef5c8005497f34 100644
--- a/webkit/fileapi/obfuscated_file_util_unittest.cc
+++ b/webkit/fileapi/obfuscated_file_util_unittest.cc
@@ -6,10 +6,10 @@
#include <set>
#include <string>
+#include "base/bind.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_callback_factory.h"
#include "base/message_loop.h"
#include "base/platform_file.h"
#include "base/scoped_temp_dir.h"
@@ -133,7 +133,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
ObfuscatedFileUtilTest()
: origin_(GURL("http://www.example.com")),
type_(kFileSystemTypeTemporary),
- callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
test_helper_(origin_, type_),
quota_status_(quota::kQuotaStatusUnknown),
usage_(-1) {
@@ -212,8 +212,8 @@ class ObfuscatedFileUtilTest : public testing::Test {
void GetUsageFromQuotaManager() {
quota_manager_->GetUsageAndQuota(
origin(), test_helper_.storage_type(),
- callback_factory_.NewCallback(
- &ObfuscatedFileUtilTest::OnGetUsage));
+ base::Bind(&ObfuscatedFileUtilTest::OnGetUsage,
+ weak_factory_.GetWeakPtr()));
MessageLoop::current()->RunAllPending();
EXPECT_EQ(quota::kQuotaStatusOk, quota_status_);
}
@@ -483,8 +483,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
scoped_refptr<FileSystemContext> file_system_context_;
GURL origin_;
fileapi::FileSystemType type_;
- base::ScopedCallbackFactory<ObfuscatedFileUtilTest>
- callback_factory_;
+ base::WeakPtrFactory<ObfuscatedFileUtilTest> weak_factory_;
FileSystemTestOriginHelper test_helper_;
quota::QuotaStatusCode quota_status_;
int64 usage_;
« no previous file with comments | « webkit/fileapi/file_system_quota_unittest.cc ('k') | webkit/quota/mock_quota_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698