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

Side by Side Diff: chromeos/dbus/dbus_thread_manager.cc

Issue 10836051: Introduce RemoveIBusEngineService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@ibus_module_revise
Patch Set: Add warning Created 8 years, 4 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
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.h ('k') | chromeos/dbus/mock_dbus_thread_manager.h » ('j') | 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 "chromeos/dbus/dbus_thread_manager.h" 5 #include "chromeos/dbus/dbus_thread_manager.h"
6 6
7 #include "base/chromeos/chromeos_version.h" 7 #include "base/chromeos/chromeos_version.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "chromeos/chromeos_switches.h" 10 #include "chromeos/chromeos_switches.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 : STUB_DBUS_CLIENT_IMPLEMENTATION; 349 : STUB_DBUS_CLIENT_IMPLEMENTATION;
350 350
351 if (ibus_engine_services_.find(object_path) 351 if (ibus_engine_services_.find(object_path)
352 == ibus_engine_services_.end()) { 352 == ibus_engine_services_.end()) {
353 ibus_engine_services_[object_path] = 353 ibus_engine_services_[object_path] =
354 IBusEngineService::Create(client_type, ibus_bus_.get(), object_path); 354 IBusEngineService::Create(client_type, ibus_bus_.get(), object_path);
355 } 355 }
356 return ibus_engine_services_[object_path]; 356 return ibus_engine_services_[object_path];
357 } 357 }
358 358
359 // DBusThreadManager override.
360 virtual void RemoveIBusEngineService(const dbus::ObjectPath& object_path) {
361 if (ibus_engine_services_.find(object_path) !=
362 ibus_engine_services_.end()) {
363 LOG(WARNING) << "Object path not found: " << object_path.value();
364 return;
365 }
366 delete ibus_engine_services_[object_path];
367 ibus_engine_services_.erase(object_path);
368 }
369
359 scoped_ptr<base::Thread> dbus_thread_; 370 scoped_ptr<base::Thread> dbus_thread_;
360 scoped_refptr<dbus::Bus> system_bus_; 371 scoped_refptr<dbus::Bus> system_bus_;
361 scoped_refptr<dbus::Bus> ibus_bus_; 372 scoped_refptr<dbus::Bus> ibus_bus_;
362 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; 373 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_;
363 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; 374 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_;
364 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; 375 scoped_ptr<BluetoothInputClient> bluetooth_input_client_;
365 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; 376 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_;
366 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; 377 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_;
367 scoped_ptr<BluetoothOutOfBandClient> bluetooth_out_of_band_client_; 378 scoped_ptr<BluetoothOutOfBandClient> bluetooth_out_of_band_client_;
368 scoped_ptr<CashewClient> cashew_client_; 379 scoped_ptr<CashewClient> cashew_client_;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } 459 }
449 460
450 // static 461 // static
451 DBusThreadManager* DBusThreadManager::Get() { 462 DBusThreadManager* DBusThreadManager::Get() {
452 CHECK(g_dbus_thread_manager) 463 CHECK(g_dbus_thread_manager)
453 << "DBusThreadManager::Get() called before Initialize()"; 464 << "DBusThreadManager::Get() called before Initialize()";
454 return g_dbus_thread_manager; 465 return g_dbus_thread_manager;
455 } 466 }
456 467
457 } // namespace chromeos 468 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.h ('k') | chromeos/dbus/mock_dbus_thread_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698