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

Issue 385013002: Componentize component_updater: Replace content::BrowserThread usage with task runners (Closed)

Created:
6 years, 5 months ago by tommycli
Modified:
6 years, 5 months ago
CC:
chromium-reviews, cpu_(ooo_6.6-7.5)
Project:
chromium
Visibility:
Public.

Description

Componentize component_updater: Replace content::BrowserThread usage with task runners This patch strips out usage of specific threads defined in content/. - Replaces FILE thread in BackgroundDownloaderWin with a SingleThreadTaskRunner backed by the FILE thread. - Replaces a bunch of DCHECK(UI thread) with use of base::ThreadChecker (which just checks that it's all on the constructor thread). - Replaces Posts to the UI thread with a post to the current message loop used in the constructor. BUG=371463 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284960

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : self review and reformat #

Patch Set 4 : #

Total comments: 20

Patch Set 5 : #

Total comments: 15

Patch Set 6 : address sorin comments #

Patch Set 7 : refactor task runner to be provided from configurator #

Patch Set 8 : #

Patch Set 9 : ran git cl format #

Total comments: 6

Patch Set 10 : Remove extraneous includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -120 lines) Patch
M chrome/browser/component_updater/background_downloader_win.h View 1 2 3 4 5 6 7 8 3 chunks +24 lines, -12 lines 0 comments Download
M chrome/browser/component_updater/background_downloader_win.cc View 1 2 3 4 5 9 chunks +33 lines, -35 lines 0 comments Download
M chrome/browser/component_updater/cld_component_installer.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/component_updater/component_patcher.cc View 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/component_updater/component_updater_configurator.h View 1 2 3 4 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/component_updater/component_updater_configurator.cc View 1 3 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/component_updater/component_updater_service.h View 1 2 3 4 5 6 7 8 6 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/component_updater/component_updater_service.cc View 1 2 3 4 5 6 7 8 23 chunks +36 lines, -28 lines 0 comments Download
M chrome/browser/component_updater/crx_downloader.h View 1 2 3 4 4 chunks +14 lines, -3 lines 0 comments Download
M chrome/browser/component_updater/crx_downloader.cc View 1 2 3 4 5 6 7 8 6 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/component_updater/default_component_installer.h View 1 2 3 4 5 6 3 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/component_updater/default_component_installer.cc View 1 2 3 4 5 6 7 8 7 chunks +19 lines, -8 lines 0 comments Download
M chrome/browser/component_updater/test/crx_downloader_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/component_updater/test/test_configurator.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/component_updater/test/test_configurator.cc View 1 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/component_updater/update_checker.cc View 1 4 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/component_updater/url_fetcher_downloader.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/component_updater/url_fetcher_downloader.cc View 1 2 3 4 chunks +5 lines, -7 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
tommycli
blundell, sorin: PTAL. This patch contains threading changes discussed in our email. See the description. ...
6 years, 5 months ago (2014-07-14 23:45:54 UTC) #1
blundell
Thanks, Tommy! https://codereview.chromium.org/385013002/diff/60001/chrome/browser/component_updater/background_downloader_win.cc File chrome/browser/component_updater/background_downloader_win.cc (right): https://codereview.chromium.org/385013002/diff/60001/chrome/browser/component_updater/background_downloader_win.cc#newcode28 chrome/browser/component_updater/background_downloader_win.cc:28: // while the BITS specific code runs ...
6 years, 5 months ago (2014-07-15 08:45:20 UTC) #2
tommycli
https://codereview.chromium.org/385013002/diff/60001/chrome/browser/component_updater/background_downloader_win.cc File chrome/browser/component_updater/background_downloader_win.cc (right): https://codereview.chromium.org/385013002/diff/60001/chrome/browser/component_updater/background_downloader_win.cc#newcode28 chrome/browser/component_updater/background_downloader_win.cc:28: // while the BITS specific code runs on a ...
6 years, 5 months ago (2014-07-15 18:58:26 UTC) #3
blundell
Sorin: friendly ping :)
6 years, 5 months ago (2014-07-21 14:20:35 UTC) #4
Sorin Jianu
lgtm +cpu Thank you! I apologize for the delayed turn over. https://codereview.chromium.org/385013002/diff/100001/chrome/browser/component_updater/background_downloader_win.cc File chrome/browser/component_updater/background_downloader_win.cc (right): ...
6 years, 5 months ago (2014-07-21 21:42:14 UTC) #5
tommycli
sorin: Thanks! https://codereview.chromium.org/385013002/diff/100001/chrome/browser/component_updater/background_downloader_win.cc File chrome/browser/component_updater/background_downloader_win.cc (right): https://codereview.chromium.org/385013002/diff/100001/chrome/browser/component_updater/background_downloader_win.cc#newcode394 chrome/browser/component_updater/background_downloader_win.cc:394: is_completed_(false) { On 2014/07/21 21:42:13, Sorin Jianu ...
6 years, 5 months ago (2014-07-21 22:00:08 UTC) #6
Sorin Jianu
Thank you Tommy! https://codereview.chromium.org/385013002/diff/100001/chrome/browser/component_updater/background_downloader_win.cc File chrome/browser/component_updater/background_downloader_win.cc (right): https://codereview.chromium.org/385013002/diff/100001/chrome/browser/component_updater/background_downloader_win.cc#newcode394 chrome/browser/component_updater/background_downloader_win.cc:394: is_completed_(false) { On 2014/07/21 22:00:07, tommycli ...
6 years, 5 months ago (2014-07-21 22:11:32 UTC) #7
tommycli
waffles: Ready for your review. Thanks!
6 years, 5 months ago (2014-07-21 22:18:15 UTC) #8
waffles
I'm not sure about the duplication on each call of "new DefaultComponentInstaller". It would be ...
6 years, 5 months ago (2014-07-21 23:41:54 UTC) #9
Sorin Jianu
On 2014/07/21 23:41:54, waffles wrote: > I'm not sure about the duplication on each call ...
6 years, 5 months ago (2014-07-22 17:53:32 UTC) #10
tommycli
waffles/sorin: I added a GetConfig method to CUS to remove the code duplication on the ...
6 years, 5 months ago (2014-07-22 18:22:26 UTC) #11
waffles
On 2014/07/22 18:22:26, tommycli wrote: > waffles/sorin: I added a GetConfig method to CUS to ...
6 years, 5 months ago (2014-07-22 19:24:18 UTC) #12
tommycli
waffles: No problem, see if this is more to your liking.
6 years, 5 months ago (2014-07-22 21:14:36 UTC) #13
waffles
lgtm % some #includes. https://codereview.chromium.org/385013002/diff/180001/chrome/browser/component_updater/cld_component_installer.cc File chrome/browser/component_updater/cld_component_installer.cc (right): https://codereview.chromium.org/385013002/diff/180001/chrome/browser/component_updater/cld_component_installer.cc#newcode16 chrome/browser/component_updater/cld_component_installer.cc:16: #include "base/threading/sequenced_worker_pool.h" Is this still ...
6 years, 5 months ago (2014-07-22 21:21:00 UTC) #14
blundell
lgtm Thanks, Tommy!
6 years, 5 months ago (2014-07-22 21:27:52 UTC) #15
tommycli
The CQ bit was checked by tommycli@chromium.org
6 years, 5 months ago (2014-07-22 21:28:36 UTC) #16
tommycli
The CQ bit was unchecked by tommycli@chromium.org
6 years, 5 months ago (2014-07-22 21:28:43 UTC) #17
tommycli
thanks https://codereview.chromium.org/385013002/diff/180001/chrome/browser/component_updater/cld_component_installer.cc File chrome/browser/component_updater/cld_component_installer.cc (right): https://codereview.chromium.org/385013002/diff/180001/chrome/browser/component_updater/cld_component_installer.cc#newcode16 chrome/browser/component_updater/cld_component_installer.cc:16: #include "base/threading/sequenced_worker_pool.h" On 2014/07/22 21:20:59, waffles wrote: > ...
6 years, 5 months ago (2014-07-22 21:47:44 UTC) #18
tommycli
The CQ bit was checked by tommycli@chromium.org
6 years, 5 months ago (2014-07-22 21:47:50 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/385013002/200001
6 years, 5 months ago (2014-07-22 21:50:01 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-23 02:26:24 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-23 04:22:47 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/31099)
6 years, 5 months ago (2014-07-23 04:22:49 UTC) #23
tommycli
The CQ bit was checked by tommycli@chromium.org
6 years, 5 months ago (2014-07-23 16:50:54 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/385013002/200001
6 years, 5 months ago (2014-07-23 16:54:46 UTC) #25
commit-bot: I haz the power
6 years, 5 months ago (2014-07-23 16:56:57 UTC) #26
Message was sent while issue was closed.
Change committed as 284960

Powered by Google App Engine
This is Rietveld 408576698