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

Issue 400843002: Clean up Bluetooth API implementation. (Closed)

Created:
6 years, 5 months ago by Ilya Sherman
Modified:
6 years, 5 months ago
Reviewers:
keybuk, armansito
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Clean up Bluetooth API implementation. * Remove some deprecated methods. * Make DoWork a void function, rather than having an unused bool return value. BUG=none TEST=none R=armansito@chromium.org, keybuk@chromium.org

Patch Set 1 #

Patch Set 2 : Remove a trailing return #

Total comments: 2

Messages

Total messages: 11 (0 generated)
Ilya Sherman
6 years, 5 months ago (2014-07-17 23:03:35 UTC) #1
keybuk
lgtm
6 years, 5 months ago (2014-07-18 00:33:36 UTC) #2
Ilya Sherman
The CQ bit was checked by isherman@chromium.org
6 years, 5 months ago (2014-07-18 00:46:00 UTC) #3
Ilya Sherman
The CQ bit was checked by isherman@chromium.org
6 years, 5 months ago (2014-07-18 00:46:05 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/400843002/20001
6 years, 5 months ago (2014-07-18 00:47:48 UTC) #5
armansito
https://codereview.chromium.org/400843002/diff/20001/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc File chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc (left): https://codereview.chromium.org/400843002/diff/20001/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc#oldcode72 chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc:72: Does this code actually compile? The reason these functions ...
6 years, 5 months ago (2014-07-18 03:26:37 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 5 months ago (2014-07-18 04:55:26 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-18 04:59:41 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/80796)
6 years, 5 months ago (2014-07-18 04:59:42 UTC) #9
Ilya Sherman
https://codereview.chromium.org/400843002/diff/20001/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc File chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc (left): https://codereview.chromium.org/400843002/diff/20001/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc#oldcode72 chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc:72: On 2014/07/18 03:26:37, armansito wrote: > Does this code ...
6 years, 5 months ago (2014-07-18 21:37:00 UTC) #10
armansito
6 years, 5 months ago (2014-07-18 21:40:54 UTC) #11
Message was sent while issue was closed.
On 2014/07/18 21:37:00, Ilya Sherman wrote:
>
https://codereview.chromium.org/400843002/diff/20001/chrome/browser/extension...
> File
> chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
> (left):
> 
>
https://codereview.chromium.org/400843002/diff/20001/chrome/browser/extension...
>
chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc:72:
> 
> On 2014/07/18 03:26:37, armansito wrote:
> > Does this code actually compile? The reason these functions return bool is
> > because of the expression the EXTENSION_FUNCTION_VALIDATE macro expands to.
> > 
> > The correct way to clean this up would be to follow the example of
> > BluetoothSocketApi and do something similar to AsyncExtensionFunction. This
is
> > on my list but it's not that urgent.
> 
> Oh, wow: EXTENSION_FUNCTION_VALIDATE returns a value in release builds, but
does
> nothing of the sort in debug builds.  So, this compiled for me locally,
despite
> the error.  Gotta love preprocessor macros...
> 
> Anyway, abandoning this CL.  Thanks for catching that.

Yeah, I ran into this same issue when writing the code for
chrome.bluetoothLowEnergy, though I decided to just return bool from DoWork
since the chrome.bluetooth code also did that :) I guess we should refactor
things later so that these function implementations have a Prepare function that
returns bool and performs the EXTENSION_FUNCTION_VALIDATE check, like
AsyncExtensionFunction does, so that DoWork doesn't have to return a value.

Powered by Google App Engine
This is Rietveld 408576698