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

Issue 507503002: Remove BrowserThread dependency from usb_service. (Closed)

Created:
6 years, 4 months ago by Reilly Grant (use Gerrit)
Modified:
6 years, 3 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, vsevik, yurys, paulirish+reviews_chromium.org, devtools-reviews_chromium.org, chromium-apps-reviews_chromium.org, aandrey+blink_chromium.org, pfeldman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove BrowserThread dependency from usb_service. Instead of explicitly depending on specific browser threads the USB service can assume that it is instantiated on BrowserThread::FILE (or equivalent) and save a TaskRunner reference from this instantiation for later use when called from other threads. To reach BrowserThread::UI (required for DBus on Chrome OS) a reference to the appropriate TaskRunner must be provided when calling UsbService::GetInstance(). BUG= Committed: https://crrev.com/e471fab8c731cfc2eacceca8cc5be524c2d6f4b4 Cr-Commit-Position: refs/heads/master@{#292546}

Patch Set 1 #

Patch Set 2 : Acquire the UsbService instance through a DeviceClient implementation. #

Total comments: 1

Patch Set 3 : Add comments describing the new DeviceClient classes. #

Total comments: 5

Patch Set 4 : Exclude ChromeDeviceClient from mobile builds. #

Total comments: 6

Patch Set 5 : Consolidate the dependencies in chrome_browser.gypi. #

Patch Set 6 : Do the same to chrome/browser/BUILD.gn. #

Total comments: 16

Patch Set 7 : Move device/common to device/core. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -149 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/DEPS View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/browser/chrome_device_client.h View 1 2 3 4 5 6 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/browser/chrome_device_client.cc View 1 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/devtools/device/usb/DEPS View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/devtools/device/usb/android_usb_device.cc View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 4 chunks +6 lines, -2 lines 0 comments Download
M components/usb_service/DEPS View 1 chunk +0 lines, -2 lines 0 comments Download
M components/usb_service/usb_device_handle_impl.h View 5 chunks +19 lines, -9 lines 0 comments Download
M components/usb_service/usb_device_handle_impl.cc View 1 2 3 4 5 6 16 chunks +83 lines, -91 lines 0 comments Download
M components/usb_service/usb_device_impl.h View 3 chunks +8 lines, -0 lines 0 comments Download
M components/usb_service/usb_device_impl.cc View 1 4 chunks +19 lines, -14 lines 0 comments Download
M components/usb_service/usb_service.h View 1 2 3 4 5 6 2 chunks +10 lines, -3 lines 0 comments Download
M components/usb_service/usb_service_impl.cc View 7 chunks +16 lines, -6 lines 0 comments Download
A + device/core/BUILD.gn View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
A + device/core/core.gyp View 1 2 3 4 5 6 1 chunk +4 lines, -7 lines 0 comments Download
A device/core/device_client.h View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
A device/core/device_client.cc View 1 2 3 4 5 6 1 chunk +38 lines, -0 lines 0 comments Download
M device/test/usb_test_gadget_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/api/usb/DEPS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/usb/usb_api.cc View 1 2 3 4 5 6 4 chunks +4 lines, -3 lines 0 comments Download
M extensions/browser/api/usb_private/DEPS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/usb_private/usb_private_api.cc View 1 2 3 4 5 6 4 chunks +4 lines, -2 lines 0 comments Download
M extensions/shell/app_shell.gyp View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/shell/browser/DEPS View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/shell/browser/shell_browser_main_parts.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M extensions/shell/browser/shell_browser_main_parts.cc View 1 2 chunks +3 lines, -0 lines 0 comments Download
A extensions/shell/browser/shell_device_client.h View 1 2 3 4 5 6 1 chunk +31 lines, -0 lines 0 comments Download
A extensions/shell/browser/shell_device_client.cc View 1 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Reilly Grant (use Gerrit)
reillyg@chromium.org changed reviewers: + rockot@chromium.org, rpaquay@chromium.org, scheib@chromium.org
6 years, 4 months ago (2014-08-25 23:10:56 UTC) #1
Reilly Grant (use Gerrit)
6 years, 4 months ago (2014-08-25 23:11:06 UTC) #2
Reilly Grant (use Gerrit)
Patchset #2 (id:20001) has been deleted
6 years, 3 months ago (2014-08-27 22:44:23 UTC) #3
Reilly Grant (use Gerrit)
At Ken's suggestion I've created a device::DeviceClient class to manage getting the UsbService instance for ...
6 years, 3 months ago (2014-08-27 22:56:48 UTC) #4
scheib
lgtm after comments added. https://codereview.chromium.org/507503002/diff/40001/device/common/device_client.h File device/common/device_client.h (right): https://codereview.chromium.org/507503002/diff/40001/device/common/device_client.h#newcode14 device/common/device_client.h:14: class DeviceClient { Every class ...
6 years, 3 months ago (2014-08-28 18:18:14 UTC) #5
Reilly Grant (use Gerrit)
reillyg@chromium.org changed reviewers: + dgozman@chromium.org, thestig@chromium.org
6 years, 3 months ago (2014-08-28 18:35:13 UTC) #6
Reilly Grant (use Gerrit)
Adding thestig for high-level //chrome/browser changes and dgozman for //chrome/browser/devtools changes.
6 years, 3 months ago (2014-08-28 18:35:55 UTC) #7
Lei Zhang
What platforms actually use usb_service?
6 years, 3 months ago (2014-08-28 18:40:02 UTC) #8
Lei Zhang
https://codereview.chromium.org/507503002/diff/60001/chrome/browser/chrome_device_client.h File chrome/browser/chrome_device_client.h (right): https://codereview.chromium.org/507503002/diff/60001/chrome/browser/chrome_device_client.h#newcode19 chrome/browser/chrome_device_client.h:19: virtual usb_service::UsbService* GetUsbService() OVERRIDE; nit: Add a comment to ...
6 years, 3 months ago (2014-08-28 18:44:58 UTC) #9
dgozman
chrome/browser/devtools rslgtm
6 years, 3 months ago (2014-08-28 19:07:26 UTC) #10
Reilly Grant (use Gerrit)
On 2014/08/28 18:40:02, Lei Zhang wrote: > What platforms actually use usb_service? Chrome OS, Linux, ...
6 years, 3 months ago (2014-08-28 19:25:14 UTC) #11
Reilly Grant (use Gerrit)
I've addressed thestig's comments and excluded ChromeDeviceClient from mobile builds (thanks for pointing that out ...
6 years, 3 months ago (2014-08-28 19:42:00 UTC) #12
Lei Zhang
On 2014/08/28 19:42:00, reillyg wrote: > I've addressed thestig's comments and excluded ChromeDeviceClient from mobile ...
6 years, 3 months ago (2014-08-28 19:56:06 UTC) #13
Lei Zhang
https://codereview.chromium.org/507503002/diff/80001/chrome/browser/browser_process_impl.h File chrome/browser/browser_process_impl.h (right): https://codereview.chromium.org/507503002/diff/80001/chrome/browser/browser_process_impl.h#newcode304 chrome/browser/browser_process_impl.h:304: #if !defined(OS_ANDROID) What about iOS? https://codereview.chromium.org/507503002/diff/80001/chrome/browser/devtools/device/usb/DEPS File chrome/browser/devtools/device/usb/DEPS (right): ...
6 years, 3 months ago (2014-08-28 20:05:32 UTC) #14
Reilly Grant (use Gerrit)
https://codereview.chromium.org/507503002/diff/80001/chrome/browser/browser_process_impl.h File chrome/browser/browser_process_impl.h (right): https://codereview.chromium.org/507503002/diff/80001/chrome/browser/browser_process_impl.h#newcode304 chrome/browser/browser_process_impl.h:304: #if !defined(OS_ANDROID) On 2014/08/28 20:05:31, Lei Zhang wrote: > ...
6 years, 3 months ago (2014-08-28 20:33:55 UTC) #15
Lei Zhang
chrome/ lgtm if you update chrome/browser/BUILD.gn to match chrome/chrome_browser.gypi.
6 years, 3 months ago (2014-08-28 20:40:20 UTC) #16
Reilly Grant (use Gerrit)
Did the same to chrome/browser/BUILD.gn.
6 years, 3 months ago (2014-08-28 20:56:13 UTC) #17
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/507503002/diff/120001/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/507503002/diff/120001/chrome/browser/browser_process_impl.cc#newcode30 chrome/browser/browser_process_impl.cc:30: #include "chrome/browser/chrome_device_client.h" Please wrap this in !defined(OS_ANDROID) https://codereview.chromium.org/507503002/diff/120001/chrome/browser/chrome_device_client.h ...
6 years, 3 months ago (2014-08-28 21:47:03 UTC) #18
Reilly Grant (use Gerrit)
https://codereview.chromium.org/507503002/diff/120001/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/507503002/diff/120001/chrome/browser/browser_process_impl.cc#newcode30 chrome/browser/browser_process_impl.cc:30: #include "chrome/browser/chrome_device_client.h" On 2014/08/28 21:47:03, Ken Rockot wrote: > ...
6 years, 3 months ago (2014-08-28 22:16:13 UTC) #19
Reilly Grant (use Gerrit)
The CQ bit was checked by reillyg@chromium.org
6 years, 3 months ago (2014-08-28 23:30:03 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reillyg@chromium.org/507503002/140001
6 years, 3 months ago (2014-08-28 23:31:24 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel_swarming on tryserver.chromium.win ...
6 years, 3 months ago (2014-08-29 00:46:53 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:140001) as 46a5475ab0ce5076bec3d05d30685537df6c04d3
6 years, 3 months ago (2014-08-29 01:58:58 UTC) #23
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:05:11 UTC) #24
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e471fab8c731cfc2eacceca8cc5be524c2d6f4b4
Cr-Commit-Position: refs/heads/master@{#292546}

Powered by Google App Engine
This is Rietveld 408576698