diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 20:03:24 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 20:03:24 +0000 |
commit | 56d82c9cc1ac26ded882c9b46694a8ea5142fdf5 (patch) | |
tree | e8ea07b1e72fcd78e7e1df3ec0b2febd131ea926 /dbus/test_service.cc | |
parent | b054193d71840378f471d8ba4819ef7487eac0b9 (diff) | |
download | chromium_src-56d82c9cc1ac26ded882c9b46694a8ea5142fdf5.zip chromium_src-56d82c9cc1ac26ded882c9b46694a8ea5142fdf5.tar.gz chromium_src-56d82c9cc1ac26ded882c9b46694a8ea5142fdf5.tar.bz2 |
Linux: use MessageLoopProxy instead of base::Thread in our DBus client library.
This allows us to use BrowserThread::GetMessageLoopProxyForThread() to specify the DBus thread.
Also do a little bit of unrelated comment cleanup.
BUG=90036
Review URL: http://codereview.chromium.org/7800023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99794 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/test_service.cc')
-rw-r--r-- | dbus/test_service.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/dbus/test_service.cc b/dbus/test_service.cc index 1b8b9bf..bc4ec86d 100644 --- a/dbus/test_service.cc +++ b/dbus/test_service.cc @@ -16,8 +16,7 @@ namespace dbus { // Echo, SlowEcho, BrokenMethod. const int TestService::kNumMethodsToExport = 3; -TestService::Options::Options() - : dbus_thread(NULL) { +TestService::Options::Options() { } TestService::Options::~Options() { @@ -25,7 +24,7 @@ TestService::Options::~Options() { TestService::TestService(const Options& options) : base::Thread("TestService"), - dbus_thread_(options.dbus_thread), + dbus_thread_message_loop_proxy_(options.dbus_thread_message_loop_proxy), on_all_methods_exported_(false, false), num_exported_methods_(0) { } @@ -100,7 +99,7 @@ void TestService::Run(MessageLoop* message_loop) { Bus::Options bus_options; bus_options.bus_type = Bus::SESSION; bus_options.connection_type = Bus::PRIVATE; - bus_options.dbus_thread = dbus_thread_; + bus_options.dbus_thread_message_loop_proxy = dbus_thread_message_loop_proxy_; bus_ = new Bus(bus_options); exported_object_ = bus_->GetExportedObject( |