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

Issue 2799003002: Unpack theme data from extensions off of UI thread. (Closed)

Created:
3 years, 8 months ago by Evan Stade
Modified:
3 years, 6 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Unpack theme data from extensions off of UI thread. Even on a beefy workstation, resizing theme images takes a long time (>1s). This causes a painful hiccup in the UI. This patch addresses that by moving the operation to a helper thread. The actual application of the theme won't be any faster but it won't block interaction. As a future area of investigation it might be worth changing the "theme installed" infobar to show earlier with a message like "installing theme..." until this operation is completed, since otherwise it can feel like nothing is happening. BUG=316070 Review-Url: https://codereview.chromium.org/2799003002 Cr-Commit-Position: refs/heads/master@{#476505} Committed: https://chromium.googlesource.com/chromium/src/+/49c3b86554c09f298bd100c02c812be4aa2f0e15

Patch Set 1 #

Patch Set 2 : fix some more tests #

Patch Set 3 : infobar #

Patch Set 4 : minor tweaks #

Patch Set 5 : migrate on ui thread #

Patch Set 6 : fix some tests #

Patch Set 7 : fix more tests #

Patch Set 8 : rebase #

Patch Set 9 : fix bad merge #

Patch Set 10 : fix tests? #

Patch Set 11 : whack a mole #

Patch Set 12 : wrangle tests into submission #

Patch Set 13 : rebase #

Patch Set 14 : fix BrowserThemePackUnittest: data race and shutdown sequence #

Total comments: 16

Patch Set 15 : reviews #

Total comments: 1

Patch Set 16 : remove extra check #

Patch Set 17 : fix gtk case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+357 lines, -210 lines) Patch
M chrome/browser/extensions/extension_install_ui_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +35 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_service_sync_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/theme_installed_infobar_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/infobars/infobars_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/single_client_themes_sync_test.cc View 1 2 3 4 5 6 7 8 9 3 chunks +37 lines, -30 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_integration_test_util.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_integration_test_util.cc View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_themes_sync_test.cc View 1 2 3 4 5 5 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack.h View 1 2 3 4 7 chunks +21 lines, -16 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +23 lines, -28 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +42 lines, -29 lines 0 comments Download
M chrome/browser/themes/theme_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +26 lines, -2 lines 0 comments Download
M chrome/browser/themes/theme_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 11 chunks +94 lines, -47 lines 0 comments Download
M chrome/browser/themes/theme_service_browsertest.cc View 1 2 3 4 5 6 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/themes/theme_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +23 lines, -14 lines 0 comments Download
M chrome/browser/ui/extensions/extension_install_ui_default.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/extensions/extension_install_ui_default.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +2 lines, -21 lines 0 comments Download
M chrome/browser/ui/search/instant_extended_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -4 lines 0 comments Download

Messages

Total messages: 101 (69 generated)
Evan Stade
Some theme related tests are still failing*, but before I go through the effort of ...
3 years, 8 months ago (2017-04-06 20:11:22 UTC) #10
pkotwicz
When BrowserThemePack::kThemePackVersion is updated we rebeuild the theme from the extension in ThemeService::MigrateTheme() on startup. ...
3 years, 8 months ago (2017-04-07 14:36:15 UTC) #11
pkotwicz
Perhaps we can do ThemeService::BuildFromExtension() off the UI thread only when it is run as ...
3 years, 8 months ago (2017-04-07 14:38:16 UTC) #12
Evan Stade
On 2017/04/07 14:36:15, pkotwicz wrote: > "startup when BrowserThemePack::kThemePackVersion has been updated look > really ...
3 years, 8 months ago (2017-04-11 21:59:13 UTC) #13
pkotwicz
Looks the same to me on Linux. Can you test on Windows and Mac? On ...
3 years, 8 months ago (2017-04-13 01:01:59 UTC) #18
Evan Stade
On 2017/04/13 01:01:59, pkotwicz wrote: > Looks the same to me on Linux. Can you ...
3 years, 8 months ago (2017-04-13 02:24:14 UTC) #19
pkotwicz
I think that erg@ said this. He was the person who wrote most of what ...
3 years, 8 months ago (2017-04-13 14:18:59 UTC) #20
Evan Stade
+erg Elliot, any recollection of this code or opinion on the above discussion (notably, whether ...
3 years, 8 months ago (2017-04-13 15:40:43 UTC) #22
Elliot Glaysher
On 2017/04/13 15:40:43, Evan Stade wrote: > +erg > > Elliot, any recollection of this ...
3 years, 8 months ago (2017-04-13 17:44:04 UTC) #23
Evan Stade
On 2017/04/13 17:44:04, Elliot Glaysher wrote: > On 2017/04/13 15:40:43, Evan Stade wrote: > > ...
3 years, 8 months ago (2017-04-13 21:45:15 UTC) #24
Elliot Glaysher
On 2017/04/13 21:45:15, Evan Stade wrote: > On 2017/04/13 17:44:04, Elliot Glaysher wrote: > > ...
3 years, 8 months ago (2017-04-13 22:21:48 UTC) #25
Evan Stade
On 2017/04/13 22:21:48, Elliot Glaysher wrote: > On 2017/04/13 21:45:15, Evan Stade wrote: > > ...
3 years, 8 months ago (2017-04-13 22:25:42 UTC) #26
Evan Stade
On 2017/04/13 22:25:42, Evan Stade wrote: > On 2017/04/13 22:21:48, Elliot Glaysher wrote: > > ...
3 years, 8 months ago (2017-04-17 20:02:40 UTC) #27
Evan Stade
On 2017/04/17 20:02:40, Evan Stade wrote: > > So it turns out that while we're ...
3 years, 8 months ago (2017-04-19 15:39:22 UTC) #32
Elliot Glaysher
(pinging who?)
3 years, 8 months ago (2017-04-19 17:24:29 UTC) #33
Evan Stade
On 2017/04/19 17:24:29, Elliot Glaysher wrote: > (pinging who?) Both. I think I responded to ...
3 years, 8 months ago (2017-04-19 17:59:58 UTC) #34
pkotwicz
erg@: Has estade@ addressed your concern about migration?
3 years, 8 months ago (2017-04-19 18:50:05 UTC) #35
Elliot Glaysher
lgtm as long as ux is fine with it. i still think having a flash ...
3 years, 8 months ago (2017-04-19 19:24:40 UTC) #36
Evan Stade
On 2017/04/19 19:24:40, Elliot Glaysher wrote: > lgtm as long as ux is fine with ...
3 years, 6 months ago (2017-05-31 21:34:44 UTC) #75
Elliot Glaysher
c/b/themes lgtm (i'm not really sure about the extensions and sync code though; those parts ...
3 years, 6 months ago (2017-05-31 22:13:25 UTC) #76
Evan Stade
+pavely for sync +rdevlin.cronin for extensions PTAL
3 years, 6 months ago (2017-05-31 22:16:07 UTC) #78
Devlin
https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/extensions/extension_install_ui_browsertest.cc File chrome/browser/extensions/extension_install_ui_browsertest.cc (right): https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/extensions/extension_install_ui_browsertest.cc#newcode73 chrome/browser/extensions/extension_install_ui_browsertest.cc:73: EXPECT_EQ(num_before + (theme_exists ? 0 : 1), num_after); Adding ...
3 years, 6 months ago (2017-06-01 00:28:09 UTC) #81
pkotwicz
Just nits! https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/themes/theme_service.cc File chrome/browser/themes/theme_service.cc (right): https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/themes/theme_service.cc#newcode892 chrome/browser/themes/theme_service.cc:892: NotifyThemeChanged(); Can this be simplified as: const ...
3 years, 6 months ago (2017-06-01 03:21:09 UTC) #82
pavely
c/b/sync/test lgtm
3 years, 6 months ago (2017-06-01 16:52:49 UTC) #83
Evan Stade
https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/extensions/extension_install_ui_browsertest.cc File chrome/browser/extensions/extension_install_ui_browsertest.cc (right): https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/extensions/extension_install_ui_browsertest.cc#newcode73 chrome/browser/extensions/extension_install_ui_browsertest.cc:73: EXPECT_EQ(num_before + (theme_exists ? 0 : 1), num_after); On ...
3 years, 6 months ago (2017-06-01 17:43:02 UTC) #84
Devlin
lgtm https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/ui/extensions/extension_install_ui_default.cc File chrome/browser/ui/extensions/extension_install_ui_default.cc (left): https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/ui/extensions/extension_install_ui_default.cc#oldcode174 chrome/browser/ui/extensions/extension_install_ui_default.cc:174: ThemeInstalledInfoBarDelegate::Create( On 2017/06/01 17:43:02, Evan Stade wrote: > ...
3 years, 6 months ago (2017-06-01 18:19:58 UTC) #85
pkotwicz
LGTM with nit Please merge with https://codereview.chromium.org/2893693002/ https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/themes/theme_service.cc File chrome/browser/themes/theme_service.cc (right): https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/themes/theme_service.cc#newcode897 chrome/browser/themes/theme_service.cc:897: previous_theme_id == ...
3 years, 6 months ago (2017-06-01 19:09:06 UTC) #86
Evan Stade
+pkasting can you PTAL chrome/browser/infobars/infobars_browsertest.cc chrome/browser/ui/search/instant_extended_interactive_uitest.cc https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/themes/theme_service.cc File chrome/browser/themes/theme_service.cc (right): https://codereview.chromium.org/2799003002/diff/260001/chrome/browser/themes/theme_service.cc#newcode897 chrome/browser/themes/theme_service.cc:897: previous_theme_id == kDefaultThemeID ...
3 years, 6 months ago (2017-06-01 23:58:54 UTC) #90
Peter Kasting
Those two tests LGTM
3 years, 6 months ago (2017-06-02 00:01:43 UTC) #93
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/2799003002/320001
3 years, 6 months ago (2017-06-02 00:20:14 UTC) #97
commit-bot: I haz the power
Committed patchset #17 (id:320001) as https://chromium.googlesource.com/chromium/src/+/49c3b86554c09f298bd100c02c812be4aa2f0e15
3 years, 6 months ago (2017-06-02 00:59:59 UTC) #100
yoichio
3 years, 6 months ago (2017-06-02 04:37:05 UTC) #101
Message was sent while issue was closed.
A revert of this CL (patchset #17 id:320001) has been created in
https://codereview.chromium.org/2919953002/ by yoichio@chromium.org.

The reason for reverting is: This causes ThemeServiceBrowserTest test failure on
Linux:
https://uberchromegw.corp.google.com/i/chromium.memory/builders/Linux%20Chrom....

Powered by Google App Engine
This is Rietveld 408576698