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

Issue 2476073003: Update PpdProvider threading model. (Closed)

Created:
4 years, 1 month ago by Carlson
Modified:
4 years, 1 month ago
Reviewers:
stevenjb, skau
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, oshima+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update PpdProvider threading model. We are crashing the browser right now because PpdProvider does disk operations (via PpdCache), and those are invoked on the UI thread. Fix this by making PpdProvider take an explicit task runner on which to do disk operations and pull them off the UI thread. BUG=662626 Committed: https://crrev.com/c31c58ba48632b1713cde7c0e83483595907fb20 Cr-Commit-Position: refs/heads/master@{#432062}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address skau comments #

Patch Set 3 : Add more logging, add bypass for manufacturer issue #

Total comments: 12

Patch Set 4 : Shift PpdProvider fetcher states into fetcher delegates. #

Patch Set 5 : Rework threading per stevenjb@'s comments #

Patch Set 6 : Fix some comment typos. #

Total comments: 27

Patch Set 7 : Address more stevenjb comments, mostly naming. #

Patch Set 8 : Fix two comments I missed. #

Patch Set 9 : Change CHECK to DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -148 lines) Patch
M chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc View 1 2 3 chunks +17 lines, -3 lines 0 comments Download
M chromeos/printing/ppd_cache.cc View 1 2 3 4 5 chunks +7 lines, -2 lines 0 comments Download
M chromeos/printing/ppd_provider.h View 1 2 3 4 5 6 7 4 chunks +7 lines, -13 lines 0 comments Download
M chromeos/printing/ppd_provider.cc View 1 2 3 4 5 6 7 8 11 chunks +174 lines, -129 lines 0 comments Download
M chromeos/printing/ppd_provider_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 38 (15 generated)
Carlson
Sean, when you get a chance can you take a look? I can't reproduce the ...
4 years, 1 month ago (2016-11-05 02:35:27 UTC) #3
skau
It looks like the task runners are not released until we run another resolve or ...
4 years, 1 month ago (2016-11-09 00:01:09 UTC) #4
skau
I patched the CL and I may have found a bug. https://codereview.chromium.org/2476073003/diff/1/chromeos/printing/ppd_provider.cc File chromeos/printing/ppd_provider.cc (left): ...
4 years, 1 month ago (2016-11-10 02:38:41 UTC) #5
Carlson
https://codereview.chromium.org/2476073003/diff/1/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc File chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc (right): https://codereview.chromium.org/2476073003/diff/1/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc#newcode88 chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc:88: .get(), On 2016/11/09 00:01:09, skau wrote: > Why are ...
4 years, 1 month ago (2016-11-10 19:22:50 UTC) #6
skau
lgtm
4 years, 1 month ago (2016-11-10 19:32:25 UTC) #7
Carlson
I missed a few things you commented on in general. Addressed them here. I also ...
4 years, 1 month ago (2016-11-11 00:41:24 UTC) #12
Carlson
Hector, can I ask you to look over the cups_printers_handler changes? Thanks, -J
4 years, 1 month ago (2016-11-11 00:50:51 UTC) #14
hcarmona
+stevenjb@ knows more about chromeos and might be a better reviewer for this CL.
4 years, 1 month ago (2016-11-11 17:38:20 UTC) #16
stevenjb
So, I proposed a fairly significant change, but given the complexity of the code here, ...
4 years, 1 month ago (2016-11-11 19:26:44 UTC) #18
Carlson
Thanks for the ideas/comments! Unreplied comments are all related to the PostTaskAndReplyWithResult suggestion which needs ...
4 years, 1 month ago (2016-11-11 23:06:50 UTC) #19
stevenjb
https://codereview.chromium.org/2476073003/diff/40001/chromeos/printing/ppd_provider.cc File chromeos/printing/ppd_provider.cc (right): https://codereview.chromium.org/2476073003/diff/40001/chromeos/printing/ppd_provider.cc#newcode87 chromeos/printing/ppd_provider.cc:87: weak_factory_.GetWeakPtr(), ppd_reference, cb)); On 2016/11/11 23:06:50, Carlson wrote: > ...
4 years, 1 month ago (2016-11-11 23:25:37 UTC) #20
Carlson
On 2016/11/11 23:25:37, stevenjb wrote: > https://codereview.chromium.org/2476073003/diff/40001/chromeos/printing/ppd_provider.cc > File chromeos/printing/ppd_provider.cc (right): > > https://codereview.chromium.org/2476073003/diff/40001/chromeos/printing/ppd_provider.cc#newcode87 > ...
4 years, 1 month ago (2016-11-12 00:54:40 UTC) #21
justincarlson
On 2016/11/12 00:54:40, Carlson wrote: > On 2016/11/11 23:25:37, stevenjb wrote: > > > https://codereview.chromium.org/2476073003/diff/40001/chromeos/printing/ppd_provider.cc ...
4 years, 1 month ago (2016-11-12 00:59:59 UTC) #22
stevenjb
I won't have a chance to re-review this again until Monday, however in regard to ...
4 years, 1 month ago (2016-11-12 01:55:49 UTC) #23
Carlson
On 2016/11/12 01:55:49, stevenjb wrote: > I won't have a chance to re-review this again ...
4 years, 1 month ago (2016-11-14 18:13:46 UTC) #24
stevenjb
Yes, that is what I am suggesting. Separate the cache lookup from the URLFetcher request. ...
4 years, 1 month ago (2016-11-14 18:20:46 UTC) #25
Carlson
On 2016/11/14 18:20:46, stevenjb wrote: > Yes, that is what I am suggesting. Separate the ...
4 years, 1 month ago (2016-11-14 20:41:20 UTC) #26
stevenjb
This looks good. The pattern of passing a unique_ptr to a task to propagate to ...
4 years, 1 month ago (2016-11-14 23:08:39 UTC) #27
Carlson
Thanks for the significant suggestions. I think this is much better off for it. I ...
4 years, 1 month ago (2016-11-14 23:27:42 UTC) #28
stevenjb
lgtm https://codereview.chromium.org/2476073003/diff/100001/chromeos/printing/ppd_provider.cc File chromeos/printing/ppd_provider.cc (right): https://codereview.chromium.org/2476073003/diff/100001/chromeos/printing/ppd_provider.cc#newcode88 chromeos/printing/ppd_provider.cc:88: CHECK(io_task_runner_->PostTaskAndReply( On 2016/11/14 23:27:41, Carlson wrote: > On ...
4 years, 1 month ago (2016-11-14 23:55:26 UTC) #29
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/2476073003/160001
4 years, 1 month ago (2016-11-15 00:49:21 UTC) #34
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 1 month ago (2016-11-15 02:24:57 UTC) #36
commit-bot: I haz the power
4 years, 1 month ago (2016-11-15 03:01:47 UTC) #38
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/c31c58ba48632b1713cde7c0e83483595907fb20
Cr-Commit-Position: refs/heads/master@{#432062}

Powered by Google App Engine
This is Rietveld 408576698