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

Unified Diff: chrome_frame/vtable_patch_manager_unittest.cc

Issue 8536037: base::Bind: Low-hanging fruit conversions of NewRunnableFunction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix 4. 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
« no previous file with comments | « chrome_frame/test/urlmon_moniker_integration_test.cc ('k') | content/browser/browser_thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/vtable_patch_manager_unittest.cc
diff --git a/chrome_frame/vtable_patch_manager_unittest.cc b/chrome_frame/vtable_patch_manager_unittest.cc
index 82b377201152096ca98c755f8ef6c14ce03cef0d..2176a05225abdb09dc16b83751fbb102636f75b8 100644
--- a/chrome_frame/vtable_patch_manager_unittest.cc
+++ b/chrome_frame/vtable_patch_manager_unittest.cc
@@ -6,6 +6,8 @@
#include <unknwn.h>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/message_loop.h"
#include "base/threading/thread.h"
#include "base/win/scoped_handle.h"
@@ -217,15 +219,16 @@ TEST_F(VtablePatchManagerTest, ThreadSafePatching) {
vtable_patch::patch_lock_.Acquire();
// Instruct the background thread to patch factory_.
- background.message_loop()->PostTask(FROM_HERE,
- NewRunnableFunction(&vtable_patch::PatchInterfaceMethods,
- &factory_,
- &IClassFactory_PatchInfo[0]));
+ background.message_loop()->PostTask(
+ FROM_HERE,
+ base::IgnoreReturn<HRESULT>(
+ base::Bind(&vtable_patch::PatchInterfaceMethods, &factory_,
+ &IClassFactory_PatchInfo[0])));
// And subsequently to signal the event. Neither of these actions should
// occur until we've released the patch lock.
- background.message_loop()->PostTask(FROM_HERE,
- NewRunnableFunction(::SetEvent, event.Get()));
+ background.message_loop()->PostTask(
+ FROM_HERE, base::IgnoreReturn<BOOL>(base::Bind(::SetEvent, event.Get())));
// Wait for a little while, to give the background thread time to process.
// We expect this wait to time out, as the background thread should end up
@@ -258,14 +261,16 @@ TEST_F(VtablePatchManagerTest, ThreadSafePatching) {
vtable_patch::patch_lock_.Acquire();
// Instruct the background thread to unpatch.
- background.message_loop()->PostTask(FROM_HERE,
- NewRunnableFunction(&vtable_patch::UnpatchInterfaceMethods,
- &IClassFactory_PatchInfo[0]));
+ background.message_loop()->PostTask(
+ FROM_HERE,
+ base::IgnoreReturn<HRESULT>(
+ base::Bind(&vtable_patch::UnpatchInterfaceMethods,
+ &IClassFactory_PatchInfo[0])));
// And subsequently to signal the event. Neither of these actions should
// occur until we've released the patch lock.
- background.message_loop()->PostTask(FROM_HERE,
- NewRunnableFunction(::SetEvent, event.Get()));
+ background.message_loop()->PostTask(
+ FROM_HERE, base::IgnoreReturn<BOOL>(base::Bind(::SetEvent, event.Get())));
// Wait for a little while, to give the background thread time to process.
// We expect this wait to time out, as the background thread should end up
« no previous file with comments | « chrome_frame/test/urlmon_moniker_integration_test.cc ('k') | content/browser/browser_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698