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

Unified Diff: chromeos/dbus/shill_client_unittest_base.cc

Issue 24554002: dbus: Replace PostTaskTo*Thread methods with Get*TaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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 | « chromeos/dbus/blocking_method_caller_unittest.cc ('k') | dbus/bus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_client_unittest_base.cc
diff --git a/chromeos/dbus/shill_client_unittest_base.cc b/chromeos/dbus/shill_client_unittest_base.cc
index ab5937e2b46d27c462ae6a4c8e6437bd0d582190..ccc481ca1c6db8f8a7861d7334da26428da53a45 100644
--- a/chromeos/dbus/shill_client_unittest_base.cc
+++ b/chromeos/dbus/shill_client_unittest_base.cc
@@ -22,12 +22,6 @@ namespace chromeos {
namespace {
-// Runs the given task. This function is used to implement the mock bus.
-void RunTask(const tracked_objects::Location& from_here,
- const base::Closure& task) {
- task.Run();
-}
-
// Pops a string-to-string dictionary from the reader.
base::DictionaryValue* PopStringToStringDictionary(
dbus::MessageReader* reader) {
@@ -158,10 +152,10 @@ void ShillClientUnittestBase::SetUp() {
GetObjectProxy(shill::kFlimflamServiceName, object_path_))
.WillOnce(Return(mock_proxy_.get()));
- // Set an expectation so mock_bus's PostTaskToDBusThread() will run the
- // given task.
- EXPECT_CALL(*mock_bus_.get(), PostTaskToDBusThread(_, _))
- .WillRepeatedly(Invoke(&RunTask));
+ // Set an expectation so mock_bus's GetDBusTaskRunner will return the current
+ // task runner.
+ EXPECT_CALL(*mock_bus_.get(), GetDBusTaskRunner())
+ .WillRepeatedly(Return(message_loop_.message_loop_proxy()));
// ShutdownAndBlock() will be called in TearDown().
EXPECT_CALL(*mock_bus_.get(), ShutdownAndBlock()).WillOnce(Return());
« no previous file with comments | « chromeos/dbus/blocking_method_caller_unittest.cc ('k') | dbus/bus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698