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

Issue 11369055: Delayed adding BluetoothEventRouter as BluetoothAdapter observer until when the (Closed)

Created:
8 years, 1 month ago by youngki
Modified:
8 years, 1 month ago
Reviewers:
miket_OOO, sky
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org, bryeung
Visibility:
Public.

Description

Delayed adding BluetoothEventRouter as BluetoothAdapter observer until when the bluetooth API calls and events are actually made. The background of this change is related to the windows implementation of BluetoothAdapter (https://chromiumcodereview.appspot.com/11345037/) where we decided to use polling approach to detect the bluetooth adapter state. In order to limit the polling, we'd like to poll when there are observers to bluetooth adapter, and that's why we'd like to delay registering observers until it's necessary. BUG=135470

Patch Set 1 #

Patch Set 2 : Fixed negating mistake #

Patch Set 3 : Added bluetooth_event_router_unittest. #

Patch Set 4 : Fixed BluetoothApiTest #

Total comments: 12

Patch Set 5 : Removed AddObserver from GetMutableAdapter. #

Patch Set 6 : Fixed BluetoothApiTest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -3 lines) Patch
M chrome/browser/extensions/api/bluetooth/bluetooth_api.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/bluetooth_event_router.h View 1 2 3 4 5 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/extensions/bluetooth_event_router.cc View 1 2 3 4 2 chunks +28 lines, -2 lines 0 comments Download
A chrome/browser/extensions/bluetooth_event_router_unittest.cc View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
M chrome/browser/extensions/event_router.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
youngki
Scott, could you take a look at this CL before I show it to @miket, ...
8 years, 1 month ago (2012-11-02 19:54:24 UTC) #1
keybuk
could you have bryeung (the author of this code) look at it instead?
8 years, 1 month ago (2012-11-05 17:51:38 UTC) #2
youngki
I cc'd Bryan on this review. Hopefully he can catch this review after he comes ...
8 years, 1 month ago (2012-11-05 18:28:29 UTC) #3
miket_OOO
LGTM with comments. http://codereview.chromium.org/11369055/diff/1007/chrome/browser/extensions/bluetooth_event_router.cc File chrome/browser/extensions/bluetooth_event_router.cc (right): http://codereview.chromium.org/11369055/diff/1007/chrome/browser/extensions/bluetooth_event_router.cc#newcode53 chrome/browser/extensions/bluetooth_event_router.cc:53: adapter_->AddObserver(this); Braces not needed. I might ...
8 years, 1 month ago (2012-11-06 02:04:09 UTC) #4
youngki
Adding Scott (@sky) for chrome/OWNERS. Scott, could you review chrome/chrome_test.gypi? I added a new unittest: ...
8 years, 1 month ago (2012-11-06 16:18:54 UTC) #5
sky
LGTM
8 years, 1 month ago (2012-11-06 16:48:42 UTC) #6
youngki
8 years, 1 month ago (2012-11-14 13:28:09 UTC) #7
The replacement of this CL submitted as
https://chromiumcodereview.appspot.com/11360200/

Closing this issue.

Powered by Google App Engine
This is Rietveld 408576698