5 years, 5 months ago
(2015-07-06 23:05:16 UTC)
#2
jyasskin: PTAL
Jeffrey Yasskin
lgtm https://codereview.chromium.org/1217983004/diff/1/content/child/bluetooth/bluetooth_dispatcher.cc File content/child/bluetooth/bluetooth_dispatcher.cc (right): https://codereview.chromium.org/1217983004/diff/1/content/child/bluetooth/bluetooth_dispatcher.cc#newcode246 content/child/bluetooth/bluetooth_dispatcher.cc:246: std::vector<uint8_t> value(byteLength); You can initialize this with "std::vector<uint8_t> ...
5 years, 5 months ago
(2015-07-07 00:31:42 UTC)
#3
5 years, 5 months ago
(2015-07-07 21:37:18 UTC)
#17
ortuno
Thanks! https://codereview.chromium.org/1217983004/diff/40001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1217983004/diff/40001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode460 content/browser/bluetooth/bluetooth_dispatcher_host.cc:460: // Kill the renderer On 2015/07/07 at 21:37:16, ...
5 years, 5 months ago
(2015-07-07 22:01:52 UTC)
#18
Thanks!
https://codereview.chromium.org/1217983004/diff/40001/content/browser/bluetoo...
File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right):
https://codereview.chromium.org/1217983004/diff/40001/content/browser/bluetoo...
content/browser/bluetooth/bluetooth_dispatcher_host.cc:460: // Kill the renderer
On 2015/07/07 at 21:37:16, palmer wrote:
> Nit: This comment is superfluous.
Done.
https://codereview.chromium.org/1217983004/diff/40001/content/common/bluetoot...
File content/common/bluetooth/bluetooth_messages.h (right):
https://codereview.chromium.org/1217983004/diff/40001/content/common/bluetoot...
content/common/bluetooth/bluetooth_messages.h:190: std::string /* error_message
*/)
On 2015/07/07 at 21:37:17, palmer wrote:
> It's generally best (smaller messages, faster) to send an error code enum and
let the recipient translate the enum value into a string at its appropriate UI
layer. The concern is more acute when the message is renderer -> browser (we
don't like to let renderers control what data is in browser memory any more than
necessary), but it's still a good practice regardless of message direction.
I considered that pattern, but there are 25 different error messages and having
such a big enum on both sides seemed unnecessary. I'm happy to use an enum
instead if you think it's necessary. Since this would be a non trivial
refactoring would it be OK to do it in a follow up CL?
ortuno
The CQ bit was checked by ortuno@chromium.org to run a CQ dry run
5 years, 5 months ago
(2015-07-08 00:29:52 UTC)
#19
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/71206) win_chromium_rel_ng on ...
5 years, 5 months ago
(2015-07-08 01:08:32 UTC)
#23
5 years, 5 months ago
(2015-07-08 15:29:37 UTC)
#28
On 2015/07/07 22:01:52, ortuno wrote:
> Thanks!
>
>
https://codereview.chromium.org/1217983004/diff/40001/content/browser/bluetoo...
> File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right):
>
>
https://codereview.chromium.org/1217983004/diff/40001/content/browser/bluetoo...
> content/browser/bluetooth/bluetooth_dispatcher_host.cc:460: // Kill the
renderer
> On 2015/07/07 at 21:37:16, palmer wrote:
> > Nit: This comment is superfluous.
>
> Done.
>
>
https://codereview.chromium.org/1217983004/diff/40001/content/common/bluetoot...
> File content/common/bluetooth/bluetooth_messages.h (right):
>
>
https://codereview.chromium.org/1217983004/diff/40001/content/common/bluetoot...
> content/common/bluetooth/bluetooth_messages.h:190: std::string /*
error_message
> */)
> On 2015/07/07 at 21:37:17, palmer wrote:
> > It's generally best (smaller messages, faster) to send an error code enum
and
> let the recipient translate the enum value into a string at its appropriate UI
> layer. The concern is more acute when the message is renderer -> browser (we
> don't like to let renderers control what data is in browser memory any more
than
> necessary), but it's still a good practice regardless of message direction.
>
> I considered that pattern, but there are 25 different error messages and
having
> such a big enum on both sides seemed unnecessary. I'm happy to use an enum
> instead if you think it's necessary. Since this would be a non trivial
> refactoring would it be OK to do it in a follow up CL?
Having a lot of messages wouldn't be a good reason to avoid the enum. I was
thinking we should send a string because some of the messages might be dynamic
(saying things like "Device with address X isn't connectable"), but a) that
would need to go into the "unsanitized_message" parameter of the DOMException
constructor, while existing messages go into the sanitized_message parameter,
and b) we could send any information the renderer doesn't already have in
explicit extra response parameters, exactly when we figure out what needs to be
formatted into the message string.
So +1 to palmer's suggestion, but also +1 to doing this in a separate patch,
since it affects many more IPCs than just the ones Gio's adding in this patch.
ortuno
@palmer: ping?
5 years, 5 months ago
(2015-07-08 19:56:40 UTC)
#29
@palmer: ping?
palmer
LGTM on the condition that you switch to the enum approach in a second CL ...
5 years, 5 months ago
(2015-07-08 21:06:10 UTC)
#30
LGTM on the condition that you switch to the enum approach in a second CL
(please CC me on that/on the bug for it). Thanks!
ortuno
The CQ bit was checked by ortuno@chromium.org
5 years, 5 months ago
(2015-07-08 21:26:51 UTC)
#31
Issue 1217983004: bluetooth: browser-side implementation of writeValue.
(Closed)
Created 5 years, 5 months ago by ortuno
Modified 5 years, 5 months ago
Reviewers: Alexei Svitkine (slow), Jeffrey Yasskin, ncarter (slow), palmer, scheib
Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-origin
Comments: 5