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

Issue 2149323003: Change the way that gzipped resources are loaded from resources.pak (Closed)

Created:
4 years, 5 months ago by Dan Beam
Modified:
4 years, 4 months ago
CC:
chromium-reviews, michaeln, vabr+watchlistpasswordmanager_chromium.org, ntp-dev+reviews_chromium.org, jam, feature-media-reviews_chromium.org, eroman, darin-cc_chromium.org, cmumford, piman+watch_chromium.org, gcasto+watchlist_chromium.org, jsbell+idb_chromium.org, agrieve, flackr
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change the way that gzipped resources are loaded from resources.pak Before, gzipped resources were given a special file header and resource bundles inspected the first couple bytes to determine if the resources was gzipped and expanded it on the current thread and responded with the decompressed resource transparently. This is pretty awesome. But you know what's cooler? Transmitting the resource gzipped (reduces over IPC size) and using the same code that handles remote network resources with: Content-Encoding: gzip via net::GZipFilter. This also dirties less memory, avoids potential collisions (though there was already nifty code that'd throw if grit tried to compress something with a header like that), and adds less code for a more tried and true, weathered gzip implementation. BUG=619091, 609219 Committed: https://crrev.com/49dab440c63881d09a313824a345ec1f8574b025 Cr-Commit-Position: refs/heads/master@{#413300}

Patch Set 1 #

Total comments: 1

Patch Set 2 : found more #

Total comments: 3

Patch Set 3 : webrtc #

Patch Set 4 : uncompress for testing #

Patch Set 5 : . #

Patch Set 6 : fix memory leak #

Patch Set 7 : whoops #

Total comments: 6

Patch Set 8 : mmenke@ review #

Patch Set 9 : gar #

Patch Set 10 : ignore gzipped resources from $i18n{} processing #

Patch Set 11 : rename #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -185 lines) Patch
M chrome/browser/ui/webui/domain_reliability_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/gcm_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/popular_sites_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/signin_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/appcache/appcache_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/gpu/gpu_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/media/media_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/webrtc/webrtc_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/webui/url_data_manager_backend.cc View 6 chunks +18 lines, -0 lines 0 comments Download
M content/browser/webui/web_ui_data_source_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/webui/web_ui_data_source_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +14 lines, -3 lines 0 comments Download
M content/public/browser/url_data_source.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/url_data_source.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/browser/web_ui_data_source.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 7 3 chunks +40 lines, -2 lines 0 comments Download
M net/filter/filter.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/filter/gzip_header.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M tools/grit/grit/format/data_pack_unittest.py View 2 chunks +0 lines, -34 lines 0 comments Download
M tools/grit/grit/node/include.py View 1 2 2 chunks +0 lines, -12 lines 0 comments Download
M tools/grit/grit/node/include_unittest.py View 1 chunk +1 line, -2 lines 0 comments Download
M ui/base/resource/resource_bundle.h View 1 2 3 2 chunks +0 lines, -11 lines 0 comments Download
M ui/base/resource/resource_bundle.cc View 1 2 3 5 chunks +26 lines, -81 lines 0 comments Download
M ui/base/resource/resource_bundle_unittest.cc View 1 2 3 1 chunk +0 lines, -38 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 83 (55 generated)
Dan Beam
what do y'all think about this?
4 years, 5 months ago (2016-07-15 02:23:23 UTC) #3
Dan Beam
btw, smaier@ and I were wondering whether all compress="gzip" resources were requested by URLs. I ...
4 years, 5 months ago (2016-07-15 02:40:54 UTC) #7
smaier
Adding flackr@, as he had some opinions on this change in the first iteration. My ...
4 years, 5 months ago (2016-07-15 14:44:47 UTC) #15
agrieve
On 2016/07/15 14:44:47, smaier wrote: > Adding flackr@, as he had some opinions on this ...
4 years, 5 months ago (2016-07-15 15:33:52 UTC) #16
Dan Beam
fyi: the test failures are tests loading some internals pages differently that users would :( ...
4 years, 5 months ago (2016-07-15 16:44:40 UTC) #17
mmenke
Just from a net/ standpoint, and avoiding duplicating code, I think that this is an ...
4 years, 5 months ago (2016-07-15 17:29:20 UTC) #18
Dan Beam
another thing I learned from mmenke@ off thread: the data still gets decompressed before it ...
4 years, 5 months ago (2016-07-15 17:33:38 UTC) #19
flackr
I'm definitely in favor of removing the magic reserved header and encoding which resources are ...
4 years, 5 months ago (2016-07-18 13:43:25 UTC) #21
mmenke
Is this CL going anywhere? Just noticed that URLRequestSimpleJob::StartAsync was a top cause of jank ...
4 years, 4 months ago (2016-08-15 18:06:28 UTC) #35
Dan Beam
On 2016/08/15 18:06:28, mmenke wrote: > Is this CL going anywhere? Just noticed that URLRequestSimpleJob::StartAsync ...
4 years, 4 months ago (2016-08-15 18:11:58 UTC) #36
Dan Beam
Allllrighty then, got things working. +creis@ for content/ +mmenke@ for net/ +sky@ for ui/, chrome/ ...
4 years, 4 months ago (2016-08-17 01:48:37 UTC) #47
Dan Beam
-creis@ (ooo), +pfeldman for content/
4 years, 4 months ago (2016-08-17 01:51:19 UTC) #49
smaier
On 2016/08/17 01:51:19, Dan Beam wrote: > -creis@ (ooo), +pfeldman for content/ lgtm
4 years, 4 months ago (2016-08-17 13:59:11 UTC) #52
sky
LGTM
4 years, 4 months ago (2016-08-17 15:34:32 UTC) #53
mmenke
net/ and the use of Filter LGTM. https://codereview.chromium.org/2149323003/diff/180001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/2149323003/diff/180001/content/public/test/browser_test_utils.cc#newcode383 content/public/test/browser_test_utils.cc:383: // TODO(dbeam): ...
4 years, 4 months ago (2016-08-18 14:40:36 UTC) #54
Dan Beam
https://codereview.chromium.org/2149323003/diff/180001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/2149323003/diff/180001/content/public/test/browser_test_utils.cc#newcode383 content/public/test/browser_test_utils.cc:383: // TODO(dbeam): why do we even have this lever^Wparameter? ...
4 years, 4 months ago (2016-08-18 20:56:51 UTC) #55
Dan Beam
ping => pfeldman@ FYI: I've found a minor issue with this patch -- we sometimes ...
4 years, 4 months ago (2016-08-19 03:19:40 UTC) #61
Dan Beam
[1] https://codereview.chromium.org/2152143002/
4 years, 4 months ago (2016-08-19 03:19:55 UTC) #62
pfeldman
Code looks good, but relying upon no $i18n templating for the gzipped htmls is no ...
4 years, 4 months ago (2016-08-19 18:14:54 UTC) #67
pfeldman
lgtm given it gets renamed to DisableI18nAndUseGzipForAllPaths for clarity.
4 years, 4 months ago (2016-08-19 18:26:31 UTC) #68
Dan Beam
On 2016/08/19 18:26:31, pfeldman wrote: > lgtm given it gets renamed to DisableI18nAndUseGzipForAllPaths for clarity. ...
4 years, 4 months ago (2016-08-19 19:13:12 UTC) #69
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/2149323003/250030
4 years, 4 months ago (2016-08-19 19:18:51 UTC) #72
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/242082)
4 years, 4 months ago (2016-08-19 19:25:50 UTC) #74
Dan Beam
+thestig@ for tools/grit
4 years, 4 months ago (2016-08-19 19:40:38 UTC) #76
Lei Zhang
lgtm
4 years, 4 months ago (2016-08-19 22:27:14 UTC) #77
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/2149323003/250030
4 years, 4 months ago (2016-08-19 22:54:03 UTC) #79
commit-bot: I haz the power
Committed patchset #11 (id:250030)
4 years, 4 months ago (2016-08-20 00:50:14 UTC) #81
commit-bot: I haz the power
4 years, 4 months ago (2016-08-20 00:53:16 UTC) #83
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/49dab440c63881d09a313824a345ec1f8574b025
Cr-Commit-Position: refs/heads/master@{#413300}

Powered by Google App Engine
This is Rietveld 408576698