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

Issue 1502663003: bluetooth: Implement allowed devices map (Closed)

Created:
5 years ago by ortuno
Modified:
4 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@my-origin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Implement allowed devices map Add a selected device to the list of allowed devices map and, before interacting with the device, check that the origin is allowed to access that device. BUG=493459 Committed: https://crrev.com/154400787a01efedca9063d98a4b0d06ebf39089 Cr-Commit-Position: refs/heads/master@{#369870}

Patch Set 1 #

Patch Set 2 : WIP 2: Pass and expect an ID rather than the address #

Patch Set 3 : Clean up #

Patch Set 4 : Add tests for map #

Patch Set 5 : Moar cleanup #

Patch Set 6 : Forgot test file #

Total comments: 40

Patch Set 7 : Address jyasskin's comments #

Total comments: 10

Patch Set 8 : Address jyasskin's comments #

Patch Set 9 : Add comment for bad renderer check #

Total comments: 16

Patch Set 10 : Address palmer's comments #

Total comments: 15

Patch Set 11 : Address palmer's comments 2 #

Patch Set 12 : Make global consts non-reference #

Patch Set 13 : Fix merge conflicts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+636 lines, -91 lines) Patch
M content/browser/bad_message.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A content/browser/bluetooth/bluetooth_allowed_devices_map.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +84 lines, -0 lines 0 comments Download
A content/browser/bluetooth/bluetooth_allowed_devices_map.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +155 lines, -0 lines 0 comments Download
A content/browser/bluetooth/bluetooth_allowed_devices_map_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +167 lines, -0 lines 0 comments Download
M content/browser/bluetooth/bluetooth_dispatcher_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +33 lines, -8 lines 0 comments Download
M content/browser/bluetooth/bluetooth_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 27 chunks +95 lines, -34 lines 0 comments Download
M content/common/bluetooth/bluetooth_messages.h View 1 2 3 4 5 6 1 chunk +18 lines, -9 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/bluetooth/bluetooth_dispatcher.h View 1 2 3 4 5 6 3 chunks +16 lines, -5 lines 0 comments Download
M content/renderer/bluetooth/bluetooth_dispatcher.cc View 1 2 3 4 5 6 14 chunks +44 lines, -20 lines 0 comments Download
M content/renderer/bluetooth/web_bluetooth_impl.cc View 1 chunk +17 lines, -14 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/idl-BluetoothDevice.html View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 40 (19 generated)
ortuno
jyasskin: PTAL. Keep in mind that with mojo we won't have to pass in the ...
5 years ago (2015-12-10 00:07:30 UTC) #11
Jeffrey Yasskin
Sorry it took me so long to review this. https://codereview.chromium.org/1502663003/diff/100001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc File content/browser/bluetooth/bluetooth_allowed_devices_map.cc (right): https://codereview.chromium.org/1502663003/diff/100001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc#newcode26 content/browser/bluetooth/bluetooth_allowed_devices_map.cc:26: ...
4 years, 11 months ago (2016-01-06 00:47:57 UTC) #12
ortuno
PTAL again. https://codereview.chromium.org/1502663003/diff/100001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc File content/browser/bluetooth/bluetooth_allowed_devices_map.cc (right): https://codereview.chromium.org/1502663003/diff/100001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc#newcode26 content/browser/bluetooth/bluetooth_allowed_devices_map.cc:26: bytes.size() + 1 /* lenght_with_null */), On ...
4 years, 11 months ago (2016-01-13 01:41:44 UTC) #14
Jeffrey Yasskin
I got through bluetooth_dispatcher_host.cc. https://codereview.chromium.org/1502663003/diff/100001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc File content/browser/bluetooth/bluetooth_allowed_devices_map.cc (right): https://codereview.chromium.org/1502663003/diff/100001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc#newcode116 content/browser/bluetooth/bluetooth_allowed_devices_map.cc:116: const std::string BluetoothAllowedDevicesMap::GenerateDeviceId( On 2016/01/13 ...
4 years, 11 months ago (2016-01-13 02:31:36 UTC) #15
Jeffrey Yasskin
LGTM after the comments in my previous email. https://codereview.chromium.org/1502663003/diff/120001/content/renderer/bluetooth/bluetooth_dispatcher.cc File content/renderer/bluetooth/bluetooth_dispatcher.cc (right): https://codereview.chromium.org/1502663003/diff/120001/content/renderer/bluetooth/bluetooth_dispatcher.cc#newcode251 content/renderer/bluetooth/bluetooth_dispatcher.cc:251: CurrentWorkerId(), ...
4 years, 11 months ago (2016-01-13 19:25:34 UTC) #16
ortuno
Thanks! https://codereview.chromium.org/1502663003/diff/120001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc File content/browser/bluetooth/bluetooth_allowed_devices_map.cc (right): https://codereview.chromium.org/1502663003/diff/120001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc#newcode50 content/browser/bluetooth/bluetooth_allowed_devices_map.cc:50: std::string device_id = GenerateDeviceId(origin); On 2016/01/13 at 02:31:36, ...
4 years, 11 months ago (2016-01-13 21:34:31 UTC) #17
ortuno
nick: PTAL at bad_message.h isherman: PTAL at histograms
4 years, 11 months ago (2016-01-13 21:35:46 UTC) #19
ortuno
https://codereview.chromium.org/1502663003/diff/100001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1502663003/diff/100001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode956 content/browser/bluetooth/bluetooth_dispatcher_host.cc:956: // Make sure the origin is allowed to access ...
4 years, 11 months ago (2016-01-13 22:12:27 UTC) #20
ortuno
palmer: PTAL at content/common/bluetooth/bluetooth_messages.h
4 years, 11 months ago (2016-01-13 22:13:58 UTC) #22
palmer
https://codereview.chromium.org/1502663003/diff/160001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc File content/browser/bluetooth/bluetooth_allowed_devices_map.cc (right): https://codereview.chromium.org/1502663003/diff/160001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc#newcode26 content/browser/bluetooth/bluetooth_allowed_devices_map.cc:26: bytes.size() + 1 /* length_with_null */), Possible performance nit: ...
4 years, 11 months ago (2016-01-13 22:52:07 UTC) #23
Ilya Sherman
histograms.xml lgtm
4 years, 11 months ago (2016-01-14 01:08:11 UTC) #24
ortuno
palmer: Ready for review again! https://codereview.chromium.org/1502663003/diff/160001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc File content/browser/bluetooth/bluetooth_allowed_devices_map.cc (right): https://codereview.chromium.org/1502663003/diff/160001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc#newcode26 content/browser/bluetooth/bluetooth_allowed_devices_map.cc:26: bytes.size() + 1 /* ...
4 years, 11 months ago (2016-01-14 02:44:58 UTC) #25
ortuno
nick & palmer: ping?
4 years, 11 months ago (2016-01-15 00:01:11 UTC) #26
palmer
LGTM from the perspective of IPC security. But, perhaps the code and comments could be ...
4 years, 11 months ago (2016-01-15 01:14:00 UTC) #27
ortuno
palmer: Thanks! I fixed the comments and added a new function for the repeated code. ...
4 years, 11 months ago (2016-01-15 02:52:22 UTC) #28
ncarter (slow)
rubber stamp lgtm
4 years, 11 months ago (2016-01-15 20:38:08 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1502663003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1502663003/220001
4 years, 11 months ago (2016-01-15 20:39:49 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/136224) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 11 months ago (2016-01-15 20:45:38 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1502663003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1502663003/240001
4 years, 11 months ago (2016-01-15 22:35:34 UTC) #37
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 11 months ago (2016-01-15 22:41:43 UTC) #38
commit-bot: I haz the power
4 years, 11 months ago (2016-01-15 22:42:51 UTC) #40
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/154400787a01efedca9063d98a4b0d06ebf39089
Cr-Commit-Position: refs/heads/master@{#369870}

Powered by Google App Engine
This is Rietveld 408576698