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

Issue 11368145: Lazy-creates BluetoothAdapter in ExtensionBluetoothEventRouter (EBEE). (Closed)

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

Description

Lazy-creates BluetoothAdapter in ExtensionBluetoothEventRouter (EBEE). Calling adapter() and GetMutableAdapter() creates and returns the refptr of BluetoothAdapter, but EBEE does not hold the reference of it. Adding BluetoothEventListener and registering BluetoothSocket creates and holds the reference of BluetoothAdapter. EBEE will release the reference if there is no socket and no listener. BUG=135470

Patch Set 1 #

Total comments: 22

Patch Set 2 : Removed .get, double assignment, etc #

Total comments: 8

Patch Set 3 : Use GetMutableAdapter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -16 lines) Patch
M chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/bluetooth_event_router.h View 1 2 4 chunks +19 lines, -6 lines 0 comments Download
M chrome/browser/extensions/bluetooth_event_router.cc View 1 2 9 chunks +71 lines, -9 lines 0 comments Download
A chrome/browser/extensions/bluetooth_event_router_unittest.cc View 1 2 1 chunk +125 lines, -0 lines 0 comments Download
M chrome/browser/extensions/event_router.cc View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
A device/bluetooth/test/mock_bluetooth_socket.h View 1 chunk +24 lines, -0 lines 0 comments Download
A device/bluetooth/test/mock_bluetooth_socket.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M device/device.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
youngki
Bryan and Mike, I decided to abandon https://chromiumcodereview.appspot.com/11369055/ after discussion with Bryan and this is ...
8 years, 1 month ago (2012-11-08 17:36:04 UTC) #1
bryeung
https://chromiumcodereview.appspot.com/11368145/diff/1/chrome/browser/extensions/bluetooth_event_router.cc File chrome/browser/extensions/bluetooth_event_router.cc (right): https://chromiumcodereview.appspot.com/11368145/diff/1/chrome/browser/extensions/bluetooth_event_router.cc#newcode37 chrome/browser/extensions/bluetooth_event_router.cc:37: if (adapter_.get()) I think the .get is actually not ...
8 years, 1 month ago (2012-11-08 19:24:02 UTC) #2
youngki
I will implement ExtensionBluetoothApi as discussed in the other email thread as soon as Yoyo's ...
8 years, 1 month ago (2012-11-09 05:12:52 UTC) #3
miket_OOO
lgtm
8 years, 1 month ago (2012-11-09 17:35:23 UTC) #4
bryeung
I'll wait for the update after Yoyo's CL lands before finishing the review. https://chromiumcodereview.appspot.com/11368145/diff/5001/chrome/browser/extensions/bluetooth_event_router.cc File ...
8 years, 1 month ago (2012-11-09 17:46:44 UTC) #5
youngki
I am combining this CL into https://chromiumcodereview.appspot.com/11360200/ Meanwhile, here goes my response. https://chromiumcodereview.appspot.com/11368145/diff/5001/chrome/browser/extensions/bluetooth_event_router.cc File chrome/browser/extensions/bluetooth_event_router.cc ...
8 years, 1 month ago (2012-11-12 23:25:24 UTC) #6
youngki
8 years, 1 month ago (2012-11-14 13:27:34 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