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

Issue 1088533003: Adding URLResponse Disk Cache to mojo. (Closed)

Created:
5 years, 8 months ago by qsr
Modified:
5 years, 7 months ago
Reviewers:
DaveMoore, blundell
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Adding URLResponse Disk Cache to mojo. This CL introduces a url response disk cache that allows the shell and content handlers to access cached response data as file without the need to stream the full content nor create a new file. It also allows content handlers to access uncompressed cached archive. The cache service is loaded internally by the shell because it is used during application loads. The android handler is using this service to cache the uncompressed archive of android applications and the compiled dex files R=blundell@chromium.org, davemoore@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/5d429aa56783d74fc94ec9dcb26e95c0d346ec33

Patch Set 1 #

Patch Set 2 : Working version #

Patch Set 3 : Last version #

Patch Set 4 : Partition cache by origin of calling application. #

Patch Set 5 : Remove logging #

Patch Set 6 : Sentinel for extracted dir #

Patch Set 7 : Some more cleanup #

Patch Set 8 : Adding a first apptest. #

Patch Set 9 : And now with full app tests and a bug fix. #

Total comments: 8

Patch Set 10 : Remove unused function #

Total comments: 10

Patch Set 11 : Follow review #

Total comments: 34

Patch Set 12 : Rename service cache to url response disk cache. #

Patch Set 13 : Follow review #

Total comments: 6

Patch Set 14 : Follow review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1116 lines, -384 lines) Patch
M mojo/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A + mojo/services/url_response_disk_cache/public/interfaces/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
A mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +35 lines, -0 lines 0 comments Download
M mojo/tools/data/apptests View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M services/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A services/url_response_disk_cache/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +90 lines, -0 lines 0 comments Download
A services/url_response_disk_cache/test_data/file1 View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A services/url_response_disk_cache/test_data/file2 View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A services/url_response_disk_cache/url_response_disk_cache_app.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +38 lines, -0 lines 0 comments Download
A services/url_response_disk_cache/url_response_disk_cache_app.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +42 lines, -0 lines 0 comments Download
A services/url_response_disk_cache/url_response_disk_cache_apptest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +267 lines, -0 lines 0 comments Download
A + services/url_response_disk_cache/url_response_disk_cache_entry.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -3 lines 0 comments Download
A services/url_response_disk_cache/url_response_disk_cache_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +58 lines, -0 lines 0 comments Download
A services/url_response_disk_cache/url_response_disk_cache_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +328 lines, -0 lines 0 comments Download
M shell/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +6 lines, -4 lines 0 comments Download
M shell/android/android_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -0 lines 0 comments Download
M shell/android/android_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +49 lines, -8 lines 0 comments Download
M shell/android/apk/src/org/chromium/mojo/shell/AndroidHandler.java View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +51 lines, -74 lines 0 comments Download
M shell/android/apk/src/org/chromium/mojo/shell/MojoShellApplication.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -10 lines 0 comments Download
M shell/android/apk/src/org/chromium/mojo/shell/ShellMain.java View 1 4 chunks +12 lines, -3 lines 0 comments Download
D shell/android/background_application_loader.h View 1 chunk +0 lines, -63 lines 0 comments Download
D shell/android/background_application_loader.cc View 1 chunk +0 lines, -71 lines 0 comments Download
D shell/android/background_application_loader_unittest.cc View 1 chunk +0 lines, -50 lines 0 comments Download
M shell/android/main.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -3 lines 0 comments Download
M shell/application_manager/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M shell/application_manager/application_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +2 lines, -2 lines 0 comments Download
M shell/application_manager/application_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -15 lines 0 comments Download
M shell/application_manager/local_fetcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +9 lines, -4 lines 0 comments Download
M shell/application_manager/native_runner.h View 1 1 chunk +4 lines, -5 lines 0 comments Download
M shell/application_manager/network_fetcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +7 lines, -2 lines 0 comments Download
M shell/application_manager/network_fetcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +18 lines, -17 lines 0 comments Download
A + shell/background_application_loader.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + shell/background_application_loader.cc View 1 chunk +1 line, -1 line 0 comments Download
A + shell/background_application_loader_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M shell/child_controller.mojom View 1 1 chunk +1 line, -2 lines 0 comments Download
M shell/child_main.cc View 1 4 chunks +1 line, -6 lines 0 comments Download
M shell/child_process_host.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M shell/child_process_host.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M shell/child_process_host_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M shell/context.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -0 lines 0 comments Download
M shell/in_process_native_runner.h View 1 2 chunks +0 lines, -2 lines 0 comments Download
M shell/in_process_native_runner.cc View 1 3 chunks +2 lines, -4 lines 0 comments Download
M shell/native_application_support.h View 1 1 chunk +2 lines, -6 lines 0 comments Download
M shell/native_application_support.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M shell/native_runner_unittest.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M shell/out_of_process_native_runner.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M shell/out_of_process_native_runner.cc View 1 2 chunks +1 line, -3 lines 0 comments Download
A + shell/url_response_disk_cache_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -10 lines 0 comments Download
A shell/url_response_disk_cache_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (2 generated)
qsr
Dave -> Can you do a first pass review of this? This is missing comment, ...
5 years, 7 months ago (2015-04-29 15:22:29 UTC) #2
DaveMoore
https://codereview.chromium.org/1088533003/diff/160001/mojo/services/service_cache/public/interfaces/service_cache.mojom File mojo/services/service_cache/public/interfaces/service_cache.mojom (right): https://codereview.chromium.org/1088533003/diff/160001/mojo/services/service_cache/public/interfaces/service_cache.mojom#newcode20 mojo/services/service_cache/public/interfaces/service_cache.mojom:20: (array<uint8>? file_path, array<uint8>? cache_dir_path); Why not String? https://codereview.chromium.org/1088533003/diff/160001/services/service_cache/BUILD.gn File ...
5 years, 7 months ago (2015-05-05 21:20:59 UTC) #3
qsr
https://codereview.chromium.org/1088533003/diff/160001/mojo/services/service_cache/public/interfaces/service_cache.mojom File mojo/services/service_cache/public/interfaces/service_cache.mojom (right): https://codereview.chromium.org/1088533003/diff/160001/mojo/services/service_cache/public/interfaces/service_cache.mojom#newcode20 mojo/services/service_cache/public/interfaces/service_cache.mojom:20: (array<uint8>? file_path, array<uint8>? cache_dir_path); On 2015/05/05 21:20:59, DaveMoore wrote: ...
5 years, 7 months ago (2015-05-06 08:13:49 UTC) #4
DaveMoore
https://codereview.chromium.org/1088533003/diff/180001/services/service_cache/service_cache_impl.cc File services/service_cache/service_cache_impl.cc (right): https://codereview.chromium.org/1088533003/diff/180001/services/service_cache/service_cache_impl.cc#newcode89 services/service_cache/service_cache_impl.cc:89: void RunCallbackWithSucess( nit: Should be RunCallbackWithSuccess https://codereview.chromium.org/1088533003/diff/180001/services/service_cache/service_cache_impl.cc#newcode147 services/service_cache/service_cache_impl.cc:147: if ...
5 years, 7 months ago (2015-05-06 22:31:21 UTC) #5
qsr
https://codereview.chromium.org/1088533003/diff/180001/services/service_cache/service_cache_impl.cc File services/service_cache/service_cache_impl.cc (right): https://codereview.chromium.org/1088533003/diff/180001/services/service_cache/service_cache_impl.cc#newcode89 services/service_cache/service_cache_impl.cc:89: void RunCallbackWithSucess( On 2015/05/06 22:31:21, DaveMoore wrote: > nit: ...
5 years, 7 months ago (2015-05-07 08:40:55 UTC) #6
blundell
Drive-by :) As a general note, the CL would benefit from more comments, especially in ...
5 years, 7 months ago (2015-05-07 11:29:22 UTC) #8
blundell
https://codereview.chromium.org/1088533003/diff/200001/services/service_cache/service_cache_impl.cc File services/service_cache/service_cache_impl.cc (right): https://codereview.chromium.org/1088533003/diff/200001/services/service_cache/service_cache_impl.cc#newcode202 services/service_cache/service_cache_impl.cc:202: if (dir.empty()) { On 2015/05/07 11:29:21, blundell wrote: > ...
5 years, 7 months ago (2015-05-07 11:33:20 UTC) #9
qsr
https://codereview.chromium.org/1088533003/diff/200001/mojo/services/service_cache/public/interfaces/BUILD.gn File mojo/services/service_cache/public/interfaces/BUILD.gn (right): https://codereview.chromium.org/1088533003/diff/200001/mojo/services/service_cache/public/interfaces/BUILD.gn#newcode25 mojo/services/service_cache/public/interfaces/BUILD.gn:25: mojo_sdk_deps = [ "mojo/public/interfaces/application" ] On 2015/05/07 11:29:21, blundell ...
5 years, 7 months ago (2015-05-07 12:49:02 UTC) #10
blundell
https://codereview.chromium.org/1088533003/diff/240001/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom File mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom (right): https://codereview.chromium.org/1088533003/diff/240001/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom#newcode13 mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom:13: // either the cached version of the given response ...
5 years, 7 months ago (2015-05-07 13:57:59 UTC) #11
DaveMoore
LGTM once moved to mojo namespace
5 years, 7 months ago (2015-05-07 14:05:34 UTC) #12
qsr
https://codereview.chromium.org/1088533003/diff/240001/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom File mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom (right): https://codereview.chromium.org/1088533003/diff/240001/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom#newcode13 mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom:13: // either the cached version of the given response ...
5 years, 7 months ago (2015-05-07 14:18:07 UTC) #13
blundell
LGTM
5 years, 7 months ago (2015-05-07 14:20:34 UTC) #14
qsr
5 years, 7 months ago (2015-05-07 14:21:04 UTC) #15
Message was sent while issue was closed.
Committed patchset #14 (id:260001) manually as
5d429aa56783d74fc94ec9dcb26e95c0d346ec33 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698