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

Issue 2797433005: Remove MessageLoop destruction observer from //device/usb (Closed)

Created:
3 years, 8 months ago by Reilly Grant (use Gerrit)
Modified:
3 years, 8 months ago
Reviewers:
scheib
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove MessageLoop destruction observer from //device/usb This patch updates UsbDeviceHandleUsbfs::FileThreadHelper to no longer be a MessageLoop::DestructionObserver and instead ensures that UsbService::ShutDown will close all open connections, destroying the FILE thread state. BUG=650723 Review-Url: https://codereview.chromium.org/2797433005 Cr-Commit-Position: refs/heads/master@{#461960} Committed: https://chromium.googlesource.com/chromium/src/+/56564d4099ebbaecf1cfb804cc09a6d198101fbb

Patch Set 1 #

Patch Set 2 : Add test for shutdown #

Total comments: 4

Patch Set 3 : Add back in the correct closed device checks #

Total comments: 2

Patch Set 4 : Further clarify cross-thread ownership #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -209 lines) Patch
M device/usb/usb_device_handle_android.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M device/usb/usb_device_handle_usbfs.h View 1 2 3 4 chunks +9 lines, -17 lines 0 comments Download
M device/usb/usb_device_handle_usbfs.cc View 1 2 3 14 chunks +217 lines, -190 lines 0 comments Download
M device/usb/usb_service.cc View 1 2 chunks +8 lines, -0 lines 0 comments Download
M device/usb/usb_service_unittest.cc View 1 4 chunks +30 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
Reilly Grant (use Gerrit)
Please take a look.
3 years, 8 months ago (2017-04-04 17:25:14 UTC) #6
scheib
https://codereview.chromium.org/2797433005/diff/20001/device/usb/usb_device_handle_usbfs.cc File device/usb/usb_device_handle_usbfs.cc (right): https://codereview.chromium.org/2797433005/diff/20001/device/usb/usb_device_handle_usbfs.cc#newcode406 device/usb/usb_device_handle_usbfs.cc:406: base::Bind(&FileThreadHelper::Start, base::Unretained(helper_.get()))); blocking_task_runner is ref counted. And helper_ is ...
3 years, 8 months ago (2017-04-04 20:17:15 UTC) #11
Reilly Grant (use Gerrit)
Add back in the correct closed device checks
3 years, 8 months ago (2017-04-04 20:30:45 UTC) #12
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2797433005/diff/20001/device/usb/usb_device_handle_usbfs.cc File device/usb/usb_device_handle_usbfs.cc (right): https://codereview.chromium.org/2797433005/diff/20001/device/usb/usb_device_handle_usbfs.cc#newcode406 device/usb/usb_device_handle_usbfs.cc:406: base::Bind(&FileThreadHelper::Start, base::Unretained(helper_.get()))); On 2017/04/04 20:17:15, scheib wrote: > blocking_task_runner ...
3 years, 8 months ago (2017-04-04 20:31:40 UTC) #13
scheib
https://codereview.chromium.org/2797433005/diff/40001/device/usb/usb_device_handle_usbfs.cc File device/usb/usb_device_handle_usbfs.cc (right): https://codereview.chromium.org/2797433005/diff/40001/device/usb/usb_device_handle_usbfs.cc#newcode428 device/usb/usb_device_handle_usbfs.cc:428: } Could release reference to blocking_task_runner_ here.
3 years, 8 months ago (2017-04-04 20:42:04 UTC) #14
Reilly Grant (use Gerrit)
Further clarify cross-thread ownership
3 years, 8 months ago (2017-04-04 23:51:38 UTC) #15
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2797433005/diff/40001/device/usb/usb_device_handle_usbfs.cc File device/usb/usb_device_handle_usbfs.cc (right): https://codereview.chromium.org/2797433005/diff/40001/device/usb/usb_device_handle_usbfs.cc#newcode428 device/usb/usb_device_handle_usbfs.cc:428: } On 2017/04/04 20:42:04, scheib wrote: > Could release ...
3 years, 8 months ago (2017-04-04 23:52:19 UTC) #16
scheib
lgtm
3 years, 8 months ago (2017-04-05 00:51:28 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2797433005/60001
3 years, 8 months ago (2017-04-05 01:30:16 UTC) #19
commit-bot: I haz the power
3 years, 8 months ago (2017-04-05 03:00:17 UTC) #22
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/56564d4099ebbaecf1cfb804cc09...

Powered by Google App Engine
This is Rietveld 408576698