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

Issue 1122103003: [Large Icon Service] Move icon resizing into worker thread. (Closed)

Created:
5 years, 7 months ago by huangs
Modified:
5 years, 5 months ago
CC:
chromium-reviews, sdefresne
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Large Icon Service] Move icon resizing into worker thread. Using https://crrev.com/15679025 as template, but with some complication involving base::CancelableTaskTracker. BUG=467712 Committed: https://crrev.com/7f7237f4f12af522dafdadb0a0f789f88f579821 Cr-Commit-Position: refs/heads/master@{#329248}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Refactoring: extract Session inner class. #

Total comments: 12

Patch Set 3 : Comment and DCHECK() fixes. #

Total comments: 15

Patch Set 4 : Make Session a class; make using callback chain functions static. #

Total comments: 22

Patch Set 5 : Make Session manage the callback chain. #

Patch Set 6 : Sync and merge (need to fix tests still). #

Patch Set 7 : Inject caller's task runner to Session; fix tests by mocking GetBackgroundTaskRunner(). #

Total comments: 4

Patch Set 8 : Rename Session to LargeIconWorker and move to anonymous namespace; use PostTaskAndReply(). #

Total comments: 14

Patch Set 9 : Comment cleanup; making ResizeLargeIconOnBackgroundThreadIfValid() a member function. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -89 lines) Patch
M components/favicon.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/favicon/core/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M components/favicon/core/DEPS View 1 2 3 1 chunk +1 line, -0 lines 1 comment Download
M components/favicon/core/large_icon_service.h View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -24 lines 0 comments Download
M components/favicon/core/large_icon_service.cc View 1 2 3 4 5 6 7 8 1 chunk +155 lines, -62 lines 0 comments Download
M components/favicon/core/large_icon_service_unittest.cc View 1 2 3 4 5 6 7 3 chunks +7 lines, -3 lines 0 comments Download

Messages

Total messages: 40 (11 generated)
huangs
Follow up CL to https://crrev.com/1107283006/, as said I'd do. PTAL.
5 years, 7 months ago (2015-05-04 22:38:58 UTC) #2
beaudoin
https://codereview.chromium.org/1122103003/diff/1/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://codereview.chromium.org/1122103003/diff/1/components/favicon/core/large_icon_service.cc#newcode116 components/favicon/core/large_icon_service.cc:116: callback.Run(result); Shouldn't that callback go back to the initial ...
5 years, 7 months ago (2015-05-05 00:00:52 UTC) #3
huangs
Updated, PTAL. https://codereview.chromium.org/1122103003/diff/1/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://codereview.chromium.org/1122103003/diff/1/components/favicon/core/large_icon_service.cc#newcode116 components/favicon/core/large_icon_service.cc:116: callback.Run(result); On 2015/05/05 00:00:52, beaudoin wrote: > ...
5 years, 7 months ago (2015-05-05 15:22:13 UTC) #4
huangs
OWNER review to jochen@, PTAL.
5 years, 7 months ago (2015-05-05 15:49:31 UTC) #7
beaudoin
https://chromiumcodereview.appspot.com/1122103003/diff/20001/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://chromiumcodereview.appspot.com/1122103003/diff/20001/components/favicon/core/large_icon_service.cc#newcode41 components/favicon/core/large_icon_service.cc:41: // Main entry point, runs on the UI thread. ...
5 years, 7 months ago (2015-05-05 19:44:40 UTC) #8
huangs
Updated, PTAL. Ping pkotwicz@, who suggested the worker thread idea. https://codereview.chromium.org/1122103003/diff/20001/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://codereview.chromium.org/1122103003/diff/20001/components/favicon/core/large_icon_service.cc#newcode41 ...
5 years, 7 months ago (2015-05-05 20:07:24 UTC) #9
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1122103003/diff/40001/components/favicon/core/BUILD.gn File components/favicon/core/BUILD.gn (right): https://codereview.chromium.org/1122103003/diff/40001/components/favicon/core/BUILD.gn#newcode32 components/favicon/core/BUILD.gn:32: "//content", //content/public/browser https://codereview.chromium.org/1122103003/diff/40001/components/favicon/core/DEPS File components/favicon/core/DEPS (right): https://codereview.chromium.org/1122103003/diff/40001/components/favicon/core/DEPS#newcode5 components/favicon/core/DEPS:5: "+content/public", ...
5 years, 7 months ago (2015-05-06 12:58:49 UTC) #10
huangs
Have a question on the general case (see comment). https://chromiumcodereview.appspot.com/1122103003/diff/40001/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://chromiumcodereview.appspot.com/1122103003/diff/40001/components/favicon/core/large_icon_service.cc#newcode120 components/favicon/core/large_icon_service.cc:120: ...
5 years, 7 months ago (2015-05-06 13:28:08 UTC) #11
beaudoin
https://codereview.chromium.org/1122103003/diff/40001/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://codereview.chromium.org/1122103003/diff/40001/components/favicon/core/large_icon_service.cc#newcode41 components/favicon/core/large_icon_service.cc:41: // Main entry point. Must run on the UI ...
5 years, 7 months ago (2015-05-06 14:06:53 UTC) #12
jochen (gone - plz use gerrit)
On 2015/05/06 at 13:28:08, huangs wrote: > Have a question on the general case (see ...
5 years, 7 months ago (2015-05-06 14:48:57 UTC) #13
huangs
Updated, PTAL. https://codereview.chromium.org/1122103003/diff/40001/components/favicon/core/BUILD.gn File components/favicon/core/BUILD.gn (right): https://codereview.chromium.org/1122103003/diff/40001/components/favicon/core/BUILD.gn#newcode32 components/favicon/core/BUILD.gn:32: "//content", On 2015/05/06 12:58:48, jochen wrote: > ...
5 years, 7 months ago (2015-05-06 22:45:14 UTC) #14
beaudoin
LGTM
5 years, 7 months ago (2015-05-06 23:42:29 UTC) #15
pkotwicz
Looks good. A few nits https://codereview.chromium.org/1122103003/diff/60001/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://codereview.chromium.org/1122103003/diff/60001/components/favicon/core/large_icon_service.cc#newcode20 components/favicon/core/large_icon_service.cc:20: // Return a TaskRunner ...
5 years, 7 months ago (2015-05-07 14:52:14 UTC) #16
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1122103003/diff/60001/components/favicon/core/BUILD.gn File components/favicon/core/BUILD.gn (right): https://codereview.chromium.org/1122103003/diff/60001/components/favicon/core/BUILD.gn#newcode32 components/favicon/core/BUILD.gn:32: "//content/public/browser", why does the gypi version not also need ...
5 years, 7 months ago (2015-05-07 15:00:41 UTC) #17
huangs
Updated with some reshuffling, PTAL. https://codereview.chromium.org/1122103003/diff/60001/components/favicon/core/BUILD.gn File components/favicon/core/BUILD.gn (right): https://codereview.chromium.org/1122103003/diff/60001/components/favicon/core/BUILD.gn#newcode32 components/favicon/core/BUILD.gn:32: "//content/public/browser", Added. https://codereview.chromium.org/1122103003/diff/60001/components/favicon/core/large_icon_service.cc File ...
5 years, 7 months ago (2015-05-07 21:01:59 UTC) #18
jochen (gone - plz use gerrit)
lgtm
5 years, 7 months ago (2015-05-08 17:26:46 UTC) #19
huangs
Fixed tests. pkotwicz@: Another look?
5 years, 7 months ago (2015-05-08 21:22:10 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1122103003/120001
5 years, 7 months ago (2015-05-08 21:25:24 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) ...
5 years, 7 months ago (2015-05-09 01:47:51 UTC) #25
pkotwicz
A few comments w.r.t to your new approach (I actually liked the static methods but ...
5 years, 7 months ago (2015-05-11 14:35:08 UTC) #26
huangs
PTAL. https://codereview.chromium.org/1122103003/diff/120001/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://codereview.chromium.org/1122103003/diff/120001/components/favicon/core/large_icon_service.cc#newcode48 components/favicon/core/large_icon_service.cc:48: this)); Nice! Done. https://codereview.chromium.org/1122103003/diff/120001/components/favicon/core/large_icon_service.h File components/favicon/core/large_icon_service.h (right): https://codereview.chromium.org/1122103003/diff/120001/components/favicon/core/large_icon_service.h#newcode33 ...
5 years, 7 months ago (2015-05-11 15:20:39 UTC) #27
pkotwicz
LGTM with nits https://codereview.chromium.org/1122103003/diff/140001/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://codereview.chromium.org/1122103003/diff/140001/components/favicon/core/large_icon_service.cc#newcode23 components/favicon/core/large_icon_service.cc:23: // the callback chain on different ...
5 years, 7 months ago (2015-05-11 18:57:39 UTC) #28
huangs
Updated. https://codereview.chromium.org/1122103003/diff/140001/components/favicon/core/large_icon_service.cc File components/favicon/core/large_icon_service.cc (right): https://codereview.chromium.org/1122103003/diff/140001/components/favicon/core/large_icon_service.cc#newcode23 components/favicon/core/large_icon_service.cc:23: // the callback chain on different threads. On ...
5 years, 7 months ago (2015-05-11 20:24:37 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1122103003/160001
5 years, 7 months ago (2015-05-11 20:25:22 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-11 21:46:35 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1122103003/160001
5 years, 7 months ago (2015-05-11 22:04:45 UTC) #36
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 7 months ago (2015-05-11 22:12:52 UTC) #37
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/7f7237f4f12af522dafdadb0a0f789f88f579821 Cr-Commit-Position: refs/heads/master@{#329248}
5 years, 7 months ago (2015-05-11 22:13:48 UTC) #38
blundell
5 years, 5 months ago (2015-07-22 15:53:35 UTC) #40
Message was sent while issue was closed.
Sylvain happened to see this code today in the codebase and trace it back to
this CL. //components/favicon/core shouldn't depend on //content.

https://codereview.chromium.org/1122103003/diff/160001/components/favicon/cor...
File components/favicon/core/DEPS (right):

https://codereview.chromium.org/1122103003/diff/160001/components/favicon/cor...
components/favicon/core/DEPS:5: "+content/public/browser",
This is actually a dependency that shouldn't have been introduced here: see the
README in //components/favicon. It should be easy to inject the
SequencedWorkerPool into LargeIconService via the //chrome-level factory instead
of using content::BrowserThread directly here.

Powered by Google App Engine
This is Rietveld 408576698