summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_database_helper_unittest.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 08:15:33 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 08:15:33 +0000
commit42f9c700fff0a8c5089f4120908de48951ec957a (patch)
treeb3911deb25d310f6897cdf416b789309e7a3dac6 /chrome/browser/browsing_data_database_helper_unittest.cc
parentb5ba4480dc52bbb92b04753aa6dce073a74438bf (diff)
downloadchromium_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_database_helper_unittest.cc')
-rw-r--r--chrome/browser/browsing_data_database_helper_unittest.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/browsing_data_database_helper_unittest.cc b/chrome/browser/browsing_data_database_helper_unittest.cc
index b5368c4..051738a 100644
--- a/chrome/browser/browsing_data_database_helper_unittest.cc
+++ b/chrome/browser/browsing_data_database_helper_unittest.cc
@@ -8,9 +8,7 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace {
-class TestCompletionCallback
- : public CallbackRunner<Tuple1<
- const std::vector<BrowsingDataDatabaseHelper::DatabaseInfo>& > > {
+class TestCompletionCallback {
public:
TestCompletionCallback()
: have_result_(false) {
@@ -22,11 +20,10 @@ class TestCompletionCallback
return result_;
}
- virtual void RunWithParams(
- const Tuple1<const std::vector<
- BrowsingDataDatabaseHelper::DatabaseInfo>& >& params) {
+ void callback(const std::vector<
+ BrowsingDataDatabaseHelper::DatabaseInfo>& info) {
have_result_ = true;
- result_ = params.a;
+ result_ = info;
}
private:
@@ -55,7 +52,8 @@ TEST(CannedBrowsingDataDatabaseTest, AddDatabase) {
helper->AddDatabase(origin2, db3, "");
TestCompletionCallback callback;
- helper->StartFetching(&callback);
+ helper->StartFetching(
+ NewCallback(&callback, &TestCompletionCallback::callback));
ASSERT_TRUE(callback.have_result());
std::vector<BrowsingDataDatabaseHelper::DatabaseInfo> result =
@@ -83,7 +81,8 @@ TEST(CannedBrowsingDataDatabaseTest, Unique) {
helper->AddDatabase(origin, db, "");
TestCompletionCallback callback;
- helper->StartFetching(&callback);
+ helper->StartFetching(
+ NewCallback(&callback, &TestCompletionCallback::callback));
ASSERT_TRUE(callback.have_result());
std::vector<BrowsingDataDatabaseHelper::DatabaseInfo> result =