diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 21:54:27 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 21:54:27 +0000 |
commit | 65db239dbd6315e1e66f696579627c388360b367 (patch) | |
tree | bd89ca255fa8a60ddc5ee29bdf32a60e436440c0 /webkit/fileapi/file_system_path_manager_unittest.cc | |
parent | fb76114572fbb128d2d8c4806d6f71e0da4f2835 (diff) | |
download | chromium_src-65db239dbd6315e1e66f696579627c388360b367.zip chromium_src-65db239dbd6315e1e66f696579627c388360b367.tar.gz chromium_src-65db239dbd6315e1e66f696579627c388360b367.tar.bz2 |
base::Bind: Convert FileSystemPathManager::GetRootPathCallback.
BUG=none
TEST=none
R=csilv@chromium.org
Review URL: http://codereview.chromium.org/8342008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106139 0039d316-1c4b-4281-b951-d872f2087c98
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_; |