diff options
Diffstat (limited to 'webkit/fileapi/file_system_path_manager_unittest.cc')
-rw-r--r-- | webkit/fileapi/file_system_path_manager_unittest.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/webkit/fileapi/file_system_path_manager_unittest.cc b/webkit/fileapi/file_system_path_manager_unittest.cc index afa157b..f99824d 100644 --- a/webkit/fileapi/file_system_path_manager_unittest.cc +++ b/webkit/fileapi/file_system_path_manager_unittest.cc @@ -8,10 +8,11 @@ #include <string> #include "base/basictypes.h" +#include "base/bind.h" #include "base/file_util.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_callback_factory.h" #include "base/memory/scoped_ptr.h" +#include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "base/scoped_temp_dir.h" @@ -210,7 +211,7 @@ FilePath UTF8ToFilePath(const std::string& str) { class FileSystemPathManagerTest : public testing::Test { public: FileSystemPathManagerTest() - : callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { + : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { } void SetUp() { @@ -252,9 +253,10 @@ class FileSystemPathManagerTest : public testing::Test { fileapi::FileSystemType type, bool create, FilePath* root_path) { - manager->ValidateFileSystemRootAndGetURL(origin_url, type, create, - callback_factory_.NewCallback( - &FileSystemPathManagerTest::OnGetRootPath)); + manager->ValidateFileSystemRootAndGetURL( + origin_url, type, create, + base::Bind(&FileSystemPathManagerTest::OnGetRootPath, + weak_factory_.GetWeakPtr())); MessageLoop::current()->RunAllPending(); if (root_path) *root_path = root_path_; @@ -275,7 +277,7 @@ class FileSystemPathManagerTest : public testing::Test { private: ScopedTempDir data_dir_; - base::ScopedCallbackFactory<FileSystemPathManagerTest> callback_factory_; + base::WeakPtrFactory<FileSystemPathManagerTest> weak_factory_; bool root_path_callback_status_; FilePath root_path_; |