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

Issue 647953003: Service Worker script sizes in database. (Closed)

Created:
6 years, 2 months ago by dmurph
Modified:
6 years, 2 months ago
Reviewers:
michaeln, jsbell
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git/+/master
Project:
chromium
Visibility:
Public.

Description

Adding size and total size to the service worker database. Tests currently do not pass because the 'resources_total_size_bytes' is not populated in the database tests, as I moved this population to the service_worker_storage class. Waiting for guidance on the best place to populate this before modifying too many tests. BUG= Committed: https://crrev.com/c6307aa9afed4a184e60aa590dc13414e85a4414 Cr-Commit-Position: refs/heads/master@{#300415}

Patch Set 1 #

Total comments: 7

Patch Set 2 : fixes #

Patch Set 3 : Rebase #

Patch Set 4 : Fixed crash where writer_ was null #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -58 lines) Patch
M content/browser/service_worker/service_worker_context_request_handler.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_database.h View 1 2 2 chunks +9 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 1 2 6 chunks +17 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_database.proto View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database_unittest.cc View 1 2 12 chunks +32 lines, -23 lines 0 comments Download
M content/browser/service_worker/service_worker_job_unittest.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_script_cache_map.h View 3 chunks +8 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_script_cache_map.cc View 1 1 chunk +28 lines, -16 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 3 chunks +8 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job.cc View 1 2 3 4 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (6 generated)
dmurph
Hello all, Please take a look at service_worker_storage.cc and service_worker_database.cc. I can put the total ...
6 years, 2 months ago (2014-10-17 00:51:50 UTC) #2
michaeln
https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_script_cache_map.cc File content/browser/service_worker/service_worker_script_cache_map.cc (right): https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_script_cache_map.cc#newcode62 content/browser/service_worker/service_worker_script_cache_map.cc:62: resource_map_[url].size_bytes = static_cast<int64>(size_bytes); is the static_cast<> needed? https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_write_to_cache_job.cc File ...
6 years, 2 months ago (2014-10-17 02:01:40 UTC) #3
chromium-reviews
Wait, so, do you think it makes sense to compute the total size in the ...
6 years, 2 months ago (2014-10-17 02:20:20 UTC) #4
chromium-reviews
(Just making sure you saw my question on the first email) On Thu, Oct 16, ...
6 years, 2 months ago (2014-10-17 02:20:53 UTC) #5
michaeln
https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_write_to_cache_job.cc File content/browser/service_worker/service_worker_write_to_cache_job.cc (right): https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_write_to_cache_job.cc#newcode187 content/browser/service_worker/service_worker_write_to_cache_job.cc:187: *bytes_read = net_bytes_read; On 2014/10/17 02:01:40, michaeln wrote: > ...
6 years, 2 months ago (2014-10-17 20:16:20 UTC) #6
michaeln
https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_database.cc#newcode295 content/browser/service_worker/service_worker_database.cc:295: version_id(kInvalidServiceWorkerVersionId), oh... also zero init the new data member ...
6 years, 2 months ago (2014-10-17 20:29:53 UTC) #7
dmurph
https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/647953003/diff/1/content/browser/service_worker/service_worker_database.cc#newcode295 content/browser/service_worker/service_worker_database.cc:295: version_id(kInvalidServiceWorkerVersionId), On 2014/10/17 20:29:53, michaeln wrote: > oh... also ...
6 years, 2 months ago (2014-10-17 22:55:19 UTC) #8
michaeln
lgtm!
6 years, 2 months ago (2014-10-20 22:03:17 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647953003/20001
6 years, 2 months ago (2014-10-20 22:08:49 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/81329) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/70976) android_aosp ...
6 years, 2 months ago (2014-10-20 22:15:39 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647953003/40001
6 years, 2 months ago (2014-10-21 00:04:44 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/27393) win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_swarming/builds/20897)
6 years, 2 months ago (2014-10-21 01:12:05 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647953003/60001
6 years, 2 months ago (2014-10-21 01:57:59 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years, 2 months ago (2014-10-21 03:40:52 UTC) #20
commit-bot: I haz the power
6 years, 2 months ago (2014-10-21 03:41:46 UTC) #21
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/c6307aa9afed4a184e60aa590dc13414e85a4414
Cr-Commit-Position: refs/heads/master@{#300415}

Powered by Google App Engine
This is Rietveld 408576698