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

Side by Side Diff: device/media_transfer_protocol/media_transfer_protocol_manager.cc

Issue 12255043: DBus: Use TaskRunners instead of MessageLoopProxies. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« dbus/mock_bus.cc ('K') | « dbus/test_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" 5 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h"
6 6
7 #include <map> 7 #include <map>
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 chromeos::DBusThreadManager* dbus_thread_manager = 44 chromeos::DBusThreadManager* dbus_thread_manager =
45 chromeos::DBusThreadManager::Get(); 45 chromeos::DBusThreadManager::Get();
46 bus = dbus_thread_manager->GetSystemBus(); 46 bus = dbus_thread_manager->GetSystemBus();
47 if (!bus) 47 if (!bus)
48 return; 48 return;
49 #else 49 #else
50 DCHECK(loop_proxy.get()); 50 DCHECK(loop_proxy.get());
51 dbus::Bus::Options options; 51 dbus::Bus::Options options;
52 options.bus_type = dbus::Bus::SYSTEM; 52 options.bus_type = dbus::Bus::SYSTEM;
53 options.connection_type = dbus::Bus::PRIVATE; 53 options.connection_type = dbus::Bus::PRIVATE;
54 options.dbus_thread_message_loop_proxy = loop_proxy; 54 options.dbus_task_runner = loop_proxy;
55 session_bus_ = new dbus::Bus(options); 55 session_bus_ = new dbus::Bus(options);
56 bus = session_bus_.get(); 56 bus = session_bus_.get();
57 #endif 57 #endif
58 58
59 DCHECK(bus); 59 DCHECK(bus);
60 mtp_client_.reset( 60 mtp_client_.reset(
61 MediaTransferProtocolDaemonClient::Create(bus, false /* not stub */)); 61 MediaTransferProtocolDaemonClient::Create(bus, false /* not stub */));
62 62
63 // Set up signals and start initializing |storage_info_map_|. 63 // Set up signals and start initializing |storage_info_map_|.
64 mtp_client_->SetUpConnections( 64 mtp_client_->SetUpConnections(
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 g_media_transfer_protocol_manager = NULL; 456 g_media_transfer_protocol_manager = NULL;
457 VLOG(1) << "MediaTransferProtocolManager Shutdown completed"; 457 VLOG(1) << "MediaTransferProtocolManager Shutdown completed";
458 } 458 }
459 459
460 // static 460 // static
461 MediaTransferProtocolManager* MediaTransferProtocolManager::GetInstance() { 461 MediaTransferProtocolManager* MediaTransferProtocolManager::GetInstance() {
462 return g_media_transfer_protocol_manager; 462 return g_media_transfer_protocol_manager;
463 } 463 }
464 464
465 } // namespace device 465 } // namespace device
OLDNEW
« dbus/mock_bus.cc ('K') | « dbus/test_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698