diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-11 08:15:33 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-11 08:15:33 +0000 |
commit | 42f9c700fff0a8c5089f4120908de48951ec957a (patch) | |
tree | b3911deb25d310f6897cdf416b789309e7a3dac6 /chrome/browser/browsing_data_appcache_helper_unittest.cc | |
parent | b5ba4480dc52bbb92b04753aa6dce073a74438bf (diff) | |
download | chromium_src-42f9c700fff0a8c5089f4120908de48951ec957a.zip chromium_src-42f9c700fff0a8c5089f4120908de48951ec957a.tar.gz chromium_src-42f9c700fff0a8c5089f4120908de48951ec957a.tar.bz2 |
Delete callbacks after use in canned browsing data helpers.
BUG=49750
TEST=Canned*.*
Review URL: http://codereview.chromium.org/3178001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_appcache_helper_unittest.cc')
-rw-r--r-- | chrome/browser/browsing_data_appcache_helper_unittest.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/browsing_data_appcache_helper_unittest.cc b/chrome/browser/browsing_data_appcache_helper_unittest.cc index e5631b1..f66e8d3 100644 --- a/chrome/browser/browsing_data_appcache_helper_unittest.cc +++ b/chrome/browser/browsing_data_appcache_helper_unittest.cc @@ -9,7 +9,7 @@ #include "testing/gtest/include/gtest/gtest.h" namespace { -class TestCompletionCallback : public CallbackRunner<Tuple0> { +class TestCompletionCallback { public: TestCompletionCallback() : have_result_(false) { @@ -17,9 +17,10 @@ class TestCompletionCallback : public CallbackRunner<Tuple0> { bool have_result() const { return have_result_; } - virtual void RunWithParams(const Tuple0& params) { + void callback() { have_result_ = true; } + private: bool have_result_; }; @@ -40,7 +41,8 @@ TEST(CannedBrowsingDataAppCacheHelperTest, SetInfo) { helper->AddAppCache(manifest3); TestCompletionCallback callback; - helper->StartFetching(&callback); + helper->StartFetching( + NewCallback(&callback, &TestCompletionCallback::callback)); ASSERT_TRUE(callback.have_result()); std::map<GURL, appcache::AppCacheInfoVector>& collection = @@ -71,7 +73,8 @@ TEST(CannedBrowsingDataAppCacheHelperTest, Unique) { helper->AddAppCache(manifest); TestCompletionCallback callback; - helper->StartFetching(&callback); + helper->StartFetching( + NewCallback(&callback, &TestCompletionCallback::callback)); ASSERT_TRUE(callback.have_result()); std::map<GURL, appcache::AppCacheInfoVector>& collection = |