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

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

Issue 556833003: Fix minor issues about DBusThreadManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/bluetooth_device_client.h" 5 #include "chromeos/dbus/bluetooth_device_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "dbus/bus.h" 10 #include "dbus/bus.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 BluetoothDeviceClient::Properties::~Properties() { 50 BluetoothDeviceClient::Properties::~Properties() {
51 } 51 }
52 52
53 53
54 // The BluetoothDeviceClient implementation used in production. 54 // The BluetoothDeviceClient implementation used in production.
55 class BluetoothDeviceClientImpl 55 class BluetoothDeviceClientImpl
56 : public BluetoothDeviceClient, 56 : public BluetoothDeviceClient,
57 public dbus::ObjectManager::Interface { 57 public dbus::ObjectManager::Interface {
58 public: 58 public:
59 BluetoothDeviceClientImpl() : weak_ptr_factory_(this) {} 59 BluetoothDeviceClientImpl()
60 : object_manager_(NULL), weak_ptr_factory_(this) {}
60 61
61 virtual ~BluetoothDeviceClientImpl() { 62 virtual ~BluetoothDeviceClientImpl() {
62 object_manager_->UnregisterInterface( 63 object_manager_->UnregisterInterface(
63 bluetooth_device::kBluetoothDeviceInterface); 64 bluetooth_device::kBluetoothDeviceInterface);
64 } 65 }
65 66
66 // BluetoothDeviceClient override. 67 // BluetoothDeviceClient override.
67 virtual void AddObserver(BluetoothDeviceClient::Observer* observer) 68 virtual void AddObserver(BluetoothDeviceClient::Observer* observer)
68 OVERRIDE { 69 OVERRIDE {
69 DCHECK(observer); 70 DCHECK(observer);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 400 }
400 401
401 BluetoothDeviceClient::~BluetoothDeviceClient() { 402 BluetoothDeviceClient::~BluetoothDeviceClient() {
402 } 403 }
403 404
404 BluetoothDeviceClient* BluetoothDeviceClient::Create() { 405 BluetoothDeviceClient* BluetoothDeviceClient::Create() {
405 return new BluetoothDeviceClientImpl(); 406 return new BluetoothDeviceClientImpl();
406 } 407 }
407 408
408 } // namespace chromeos 409 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698