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

Unified Diff: device/bluetooth/bluetooth_adapter_chromeos.cc

Issue 11369055: Delayed adding BluetoothEventRouter as BluetoothAdapter observer until when the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed BluetoothApiTest Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_adapter_chromeos.cc
diff --git a/device/bluetooth/bluetooth_adapter_chromeos.cc b/device/bluetooth/bluetooth_adapter_chromeos.cc
index 36699e556843ed732046c26631f5f137f0b57736..a355f40b7dc413c608b8dbed2bdae3e3b88c0b7e 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos.cc
+++ b/device/bluetooth/bluetooth_adapter_chromeos.cc
@@ -51,7 +51,8 @@ BluetoothAdapterChromeOs::~BluetoothAdapterChromeOs() {
void BluetoothAdapterChromeOs::AddObserver(
BluetoothAdapter::Observer* observer) {
DCHECK(observer);
- observers_.AddObserver(observer);
+ if (!observers_.HasObserver(observer))
miket_OOO 2012/11/06 02:04:09 Aha. Would it make sense to move this check into G
youngki 2012/11/06 16:18:54 Done. Reverted this file and this check is now don
+ observers_.AddObserver(observer);
}
void BluetoothAdapterChromeOs::RemoveObserver(
« chrome/browser/extensions/bluetooth_event_router_unittest.cc ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698