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

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

Issue 556833003: Fix minor issues about DBusThreadManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. 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
« no previous file with comments | « no previous file | chromeos/dbus/bluetooth_agent_service_provider.cc » ('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 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_adapter_client.h" 5 #include "chromeos/dbus/bluetooth_adapter_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 "dbus/bus.h" 9 #include "dbus/bus.h"
10 #include "dbus/message.h" 10 #include "dbus/message.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 BluetoothAdapterClient::Properties::~Properties() { 44 BluetoothAdapterClient::Properties::~Properties() {
45 } 45 }
46 46
47 47
48 // The BluetoothAdapterClient implementation used in production. 48 // The BluetoothAdapterClient implementation used in production.
49 class BluetoothAdapterClientImpl 49 class BluetoothAdapterClientImpl
50 : public BluetoothAdapterClient, 50 : public BluetoothAdapterClient,
51 public dbus::ObjectManager::Interface { 51 public dbus::ObjectManager::Interface {
52 public: 52 public:
53 BluetoothAdapterClientImpl() : weak_ptr_factory_(this) {} 53 BluetoothAdapterClientImpl()
54 : object_manager_(NULL), weak_ptr_factory_(this) {}
54 55
55 virtual ~BluetoothAdapterClientImpl() { 56 virtual ~BluetoothAdapterClientImpl() {
56 object_manager_->UnregisterInterface( 57 object_manager_->UnregisterInterface(
57 bluetooth_adapter::kBluetoothAdapterInterface); 58 bluetooth_adapter::kBluetoothAdapterInterface);
58 } 59 }
59 60
60 // BluetoothAdapterClient override. 61 // BluetoothAdapterClient override.
61 virtual void AddObserver(BluetoothAdapterClient::Observer* observer) 62 virtual void AddObserver(BluetoothAdapterClient::Observer* observer)
62 OVERRIDE { 63 OVERRIDE {
63 DCHECK(observer); 64 DCHECK(observer);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 256 }
256 257
257 BluetoothAdapterClient::~BluetoothAdapterClient() { 258 BluetoothAdapterClient::~BluetoothAdapterClient() {
258 } 259 }
259 260
260 BluetoothAdapterClient* BluetoothAdapterClient::Create() { 261 BluetoothAdapterClient* BluetoothAdapterClient::Create() {
261 return new BluetoothAdapterClientImpl; 262 return new BluetoothAdapterClientImpl;
262 } 263 }
263 264
264 } // namespace chromeos 265 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/bluetooth_agent_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698