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

Issue 2223203002: arc: bluetooth: Add/Remove BT observer only when ARC is ready (Closed)

Created:
4 years, 4 months ago by puthik_chromium
Modified:
4 years, 4 months ago
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, rkc, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

arc: bluetooth: Add/Remove BT observer only when ARC is ready The current implementation make arc_bluetooth_bridge to be a bluetooth observer all the time. This lead to unnessary work when ARC is not ready. This patch changes that by register arc_bluetooth_bridge to be a bluetooth observer when arc is ready and unregister when arc is gone BUG=635578 TEST=No log spam when there is no arc support Committed: https://crrev.com/1ffc3026c8758d9464e76d8ea0fd0c542906e4cb Cr-Commit-Position: refs/heads/master@{#410828}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Add more check #

Total comments: 7

Patch Set 3 : Fix #2 comment #

Total comments: 9

Patch Set 4 : Fix comment #

Patch Set 5 : Add HasObserver #

Total comments: 6

Patch Set 6 : Fix nit in last patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -4 lines) Patch
M components/arc/bluetooth/arc_bluetooth_bridge.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/arc/bluetooth/arc_bluetooth_bridge.cc View 1 2 3 4 5 3 chunks +22 lines, -4 lines 0 comments Download
M device/bluetooth/bluetooth_adapter.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/bluetooth_adapter.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (8 generated)
puthik_chromium
+ortuno for BT review (discussed offline) fyi: rkc
4 years, 4 months ago (2016-08-08 20:41:14 UTC) #2
rkc
https://codereview.chromium.org/2223203002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode216 components/arc/bluetooth/arc_bluetooth_bridge.cc:216: VLOG(1) << "registering bluetooth adapter"; VLOG(1) << "Registering Bluetooth ...
4 years, 4 months ago (2016-08-08 21:08:13 UTC) #4
Luis Héctor Chávez
https://codereview.chromium.org/2223203002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode211 components/arc/bluetooth/arc_bluetooth_bridge.cc:211: // We should register ourself to bluetooth observer here. ...
4 years, 4 months ago (2016-08-08 21:12:03 UTC) #6
rkc
https://codereview.chromium.org/2223203002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (left): https://codereview.chromium.org/2223203002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc#oldcode221 components/arc/bluetooth/arc_bluetooth_bridge.cc:221: bluetooth_instance->Init(binding_.CreateInterfacePtrAndBind()); Where are we doing this now? https://codereview.chromium.org/2223203002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc File ...
4 years, 4 months ago (2016-08-08 21:16:15 UTC) #7
puthik_chromium
https://codereview.chromium.org/2223203002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode216 components/arc/bluetooth/arc_bluetooth_bridge.cc:216: VLOG(1) << "registering bluetooth adapter"; On 2016/08/08 21:08:12, rkc ...
4 years, 4 months ago (2016-08-08 21:40:26 UTC) #8
Luis Héctor Chávez
https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode212 components/arc/bluetooth/arc_bluetooth_bridge.cc:212: if (!bluetooth_observer_flag_ && s/bluetooth_observer_flag_/bluetooth_adapter_->HasObserver(this)/ across all the file.
4 years, 4 months ago (2016-08-08 21:54:16 UTC) #9
rkc
https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode182 components/arc/bluetooth/arc_bluetooth_bridge.cc:182: if (BluetoothAdapterFactory::IsBluetoothAdapterAvailable()) { This is a useless check. This ...
4 years, 4 months ago (2016-08-08 21:58:30 UTC) #10
puthik_chromium
https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode182 components/arc/bluetooth/arc_bluetooth_bridge.cc:182: if (BluetoothAdapterFactory::IsBluetoothAdapterAvailable()) { On 2016/08/08 21:58:29, rkc wrote: > ...
4 years, 4 months ago (2016-08-08 22:33:33 UTC) #11
rkc
https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode212 components/arc/bluetooth/arc_bluetooth_bridge.cc:212: if (!bluetooth_observer_flag_ && On 2016/08/08 22:33:32, puthik_chromium wrote: > ...
4 years, 4 months ago (2016-08-08 22:36:32 UTC) #12
puthik_chromium
https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/40001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode212 components/arc/bluetooth/arc_bluetooth_bridge.cc:212: if (!bluetooth_observer_flag_ && On 2016/08/08 22:36:32, rkc wrote: > ...
4 years, 4 months ago (2016-08-08 22:46:51 UTC) #13
ortuno
device/bluetooth rs lgtm, didn't look at the rest.
4 years, 4 months ago (2016-08-08 22:53:20 UTC) #14
rkc
lgtm % comments https://codereview.chromium.org/2223203002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode232 components/arc/bluetooth/arc_bluetooth_bridge.cc:232: if (!bluetooth_adapter_->HasObserver(this) && bluetooth_adapter_) bluetooth_adapter_ && ...
4 years, 4 months ago (2016-08-08 23:53:34 UTC) #15
Luis Héctor Chávez
lgtm with nit https://codereview.chromium.org/2223203002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode215 components/arc/bluetooth/arc_bluetooth_bridge.cc:215: bluetooth_adapter_->AddObserver(this); nit: This line needs braces ...
4 years, 4 months ago (2016-08-08 23:59:20 UTC) #16
puthik_chromium
https://codereview.chromium.org/2223203002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2223203002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode215 components/arc/bluetooth/arc_bluetooth_bridge.cc:215: bluetooth_adapter_->AddObserver(this); On 2016/08/08 23:59:20, Luis Héctor Chávez wrote: > ...
4 years, 4 months ago (2016-08-09 00:08:57 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2223203002/100001
4 years, 4 months ago (2016-08-09 00:09:38 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/273697)
4 years, 4 months ago (2016-08-09 01:05:08 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2223203002/100001
4 years, 4 months ago (2016-08-09 20:27:56 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-09 21:29:46 UTC) #25
commit-bot: I haz the power
4 years, 4 months ago (2016-08-09 21:31:20 UTC) #27
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/1ffc3026c8758d9464e76d8ea0fd0c542906e4cb
Cr-Commit-Position: refs/heads/master@{#410828}

Powered by Google App Engine
This is Rietveld 408576698