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

Unified Diff: chrome_frame/test/infobar_unittests.cc

Issue 8555001: base::Bind: Convert chrome_frame/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TaskMarshaller fix. Created 9 years, 1 month 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
Index: chrome_frame/test/infobar_unittests.cc
diff --git a/chrome_frame/test/infobar_unittests.cc b/chrome_frame/test/infobar_unittests.cc
index 1707d6012fbe513cb5c7b9e8893e017211480612..6704e296aede77687ca20e2446fb2380cb7f17a5 100644
--- a/chrome_frame/test/infobar_unittests.cc
+++ b/chrome_frame/test/infobar_unittests.cc
@@ -8,6 +8,8 @@
#include <atlmisc.h>
#include <atlwin.h>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/string_number_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -18,9 +20,6 @@
#include "chrome_frame/infobars/internal/subclassing_window_with_delegate.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
-DISABLE_RUNNABLE_METHOD_REFCOUNT(InfobarContent::Frame);
-DISABLE_RUNNABLE_METHOD_REFCOUNT(InfobarManager);
-
namespace {
RECT kInitialParentWindowRect = {20, 20, 300, 300};
@@ -404,17 +403,13 @@ ACTION_P(ResetFlag, flag) {
}
ACTION_P2(AsynchronousCloseOnFrame, loop, frame) {
- loop->PostDelayedTask(
- FROM_HERE,
- NewRunnableMethod(*frame, &InfobarContent::Frame::CloseInfobar),
- 0);
+ loop->PostTask(FROM_HERE, base::Bind(&InfobarContent::Frame::CloseInfobar,
+ base::Unretained(*frame)));
}
ACTION_P2(AsynchronousHideOnManager, loop, manager) {
- loop->PostDelayedTask(
- FROM_HERE,
- NewRunnableMethod(manager, &InfobarManager::Hide, TOP_INFOBAR),
- 0);
+ loop->PostTask(FROM_HERE, base::Bind(&InfobarManager::Hide,
+ base::Unretained(manager), TOP_INFOBAR));
}
}; // namespace

Powered by Google App Engine
This is Rietveld 408576698