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

Issue 895933007: [Storage] Blob items are now shared between blobs. Ready for disk swap. (Closed)

Created:
5 years, 10 months ago by dmurph
Modified:
5 years, 9 months ago
CC:
chromium-reviews, cmumford, darin-cc_chromium.org, dgrogan, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, jsbell+idb_chromium.org, kinuko+fileapi, kinuko+serviceworker, kinuko+watch, michaeln, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Storage] Blob items are now shared between blobs. Ready for disk swap. * Added ShareableBlobDataItem for sharing items between blobs, and implemented blob item sharing. * Added InternalBlobData for the internal storage of blobs. * Removed CreateSnapshot ability from the old Builder, which is now exclusively used to tell the context to create a blob. * Fixed copying of the content_disposition header when programmatically creating a blob. * Fixed UMA histogram for files that have uint64max length value (which signifies 'end-of-file' without knowing the size), and added a histogram to track how often this happens. * Added more documentation and histograms for knowing the state of blobs on the web. Design Doc: https://bit.ly/AutoBlobToDisk R=michaeln BUG=375297 Committed: https://crrev.com/8acaec3721c8f1b76004194be81612ee5ff08ecf Cr-Commit-Position: refs/heads/master@{#315702}

Patch Set 1 #

Total comments: 32

Patch Set 2 : Addressed comments, fixed comparison, and cleanup #

Patch Set 3 : Last comment #

Patch Set 4 : Fixed UMA histogram #

Patch Set 5 : Build file update #

Patch Set 6 : Asan test fixes #

Patch Set 7 : Added histograms and descriptions #

Patch Set 8 : Merge and possible windows fix #

Patch Set 9 : Windows fix #

Total comments: 2

Patch Set 10 : Documentation fix #

Total comments: 22

Patch Set 11 : Cleanup and added one more histogram #

Unified diffs Side-by-side diffs Delta from patch set Stats (+902 lines, -304 lines) Patch
M content/browser/fileapi/blob_storage_context_unittest.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +142 lines, -48 lines 0 comments Download
M content/browser/fileapi/blob_url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +21 lines, -4 lines 0 comments Download
M content/browser/fileapi/chrome_blob_storage_context.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M content/browser/indexed_db/indexed_db_dispatcher_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/upload_data_stream_builder_unittest.cc View 1 1 chunk +6 lines, -11 lines 0 comments Download
M content/browser/service_worker/service_worker_cache.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_cache_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/child/webblobregistry_impl.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M content/public/test/mock_blob_url_request_context.cc View 1 chunk +1 line, -1 line 0 comments Download
M storage/browser/BUILD.gn View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M storage/browser/blob/blob_data_builder.h View 1 2 3 4 5 6 7 5 chunks +19 lines, -15 lines 0 comments Download
M storage/browser/blob/blob_data_builder.cc View 1 2 3 4 5 6 7 8 5 chunks +16 lines, -24 lines 0 comments Download
M storage/browser/blob/blob_data_item.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M storage/browser/blob/blob_data_snapshot.h View 2 chunks +6 lines, -1 line 0 comments Download
M storage/browser/blob/blob_data_snapshot.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M storage/browser/blob/blob_storage_context.h View 1 2 3 4 5 6 7 8 9 10 7 chunks +42 lines, -25 lines 0 comments Download
M storage/browser/blob/blob_storage_context.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +272 lines, -155 lines 0 comments Download
A storage/browser/blob/internal_blob_data.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +83 lines, -0 lines 0 comments Download
A storage/browser/blob/internal_blob_data.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +110 lines, -0 lines 0 comments Download
A storage/browser/blob/shareable_blob_data_item.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +47 lines, -0 lines 0 comments Download
A storage/browser/blob/shareable_blob_data_item.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +26 lines, -0 lines 0 comments Download
M storage/browser/blob/view_blob_internals_job.h View 2 chunks +2 lines, -2 lines 0 comments Download
M storage/browser/blob/view_blob_internals_job.cc View 4 chunks +4 lines, -5 lines 0 comments Download
M storage/storage_browser.gyp View 1 chunk +4 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 6 chunks +71 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (5 generated)
dmurph
Hey Michael, PTAL at the first draft of this patch. Thanks! Daniel
5 years, 10 months ago (2015-02-04 02:15:05 UTC) #1
michaeln
https://codereview.chromium.org/895933007/diff/1/storage/browser/blob/blob_data_builder.cc File storage/browser/blob/blob_data_builder.cc (right): https://codereview.chromium.org/895933007/diff/1/storage/browser/blob/blob_data_builder.cc#newcode85 storage/browser/blob/blob_data_builder.cc:85: scoped_ptr<BlobDataBuilder> BlobDataBuilder::Clone() { Is there a use case for ...
5 years, 10 months ago (2015-02-05 20:02:09 UTC) #2
michaeln
https://codereview.chromium.org/895933007/diff/1/storage/browser/blob/blob_storage_context.cc File storage/browser/blob/blob_storage_context.cc (right): https://codereview.chromium.org/895933007/diff/1/storage/browser/blob/blob_storage_context.cc#newcode102 storage/browser/blob/blob_storage_context.cc:102: if (entry->flags & EXCEEDED_MEMORY) not sure this test is ...
5 years, 10 months ago (2015-02-05 22:58:48 UTC) #3
dmurph
Hey Michael, I tried to make this cleaner, please take a look. I'm also now ...
5 years, 10 months ago (2015-02-06 01:32:31 UTC) #4
dmurph
+asvitkine for histogram.xml changes.
5 years, 10 months ago (2015-02-06 21:57:17 UTC) #6
michaeln
lgtm! https://codereview.chromium.org/895933007/diff/160001/storage/browser/blob/blob_storage_context.cc File storage/browser/blob/blob_storage_context.cc (right): https://codereview.chromium.org/895933007/diff/160001/storage/browser/blob/blob_storage_context.cc#newcode301 storage/browser/blob/blob_storage_context.cc:301: // 4) The Blob items are expanded. consider ...
5 years, 10 months ago (2015-02-09 22:31:40 UTC) #7
dmurph
Hello Nasko, Please take a look at the changes in these files: content/child/webblobregistry_impl.cc content/browser/loader/upload_data_stream_builder_unittest.cc content/public/test/mock_blob_url_request_context.cc ...
5 years, 10 months ago (2015-02-10 01:36:31 UTC) #9
dmurph
Hello Nasko, Please take a look at the changes in these files: content/child/webblobregistry_impl.cc content/browser/loader/upload_data_stream_builder_unittest.cc content/public/test/mock_blob_url_request_context.cc ...
5 years, 10 months ago (2015-02-10 01:36:51 UTC) #11
nasko
content/child/webblobregistry_impl.cc content/browser/loader/upload_data_stream_builder_unittest.cc content/public/test/mock_blob_url_request_context.cc LGTM
5 years, 10 months ago (2015-02-10 15:50:06 UTC) #12
Alexei Svitkine (slow)
https://codereview.chromium.org/895933007/diff/180001/content/browser/fileapi/blob_storage_context_unittest.cc File content/browser/fileapi/blob_storage_context_unittest.cc (right): https://codereview.chromium.org/895933007/diff/180001/content/browser/fileapi/blob_storage_context_unittest.cc#newcode152 content/browser/fileapi/blob_storage_context_unittest.cc:152: { Nit: Maybe make a helper function for this ...
5 years, 10 months ago (2015-02-10 16:05:06 UTC) #13
dmurph
I added another histogram to show the distribution of unshared memory. https://codereview.chromium.org/895933007/diff/180001/content/browser/fileapi/blob_storage_context_unittest.cc File content/browser/fileapi/blob_storage_context_unittest.cc (right): ...
5 years, 10 months ago (2015-02-10 22:17:47 UTC) #15
Alexei Svitkine (slow)
lgtm
5 years, 10 months ago (2015-02-10 22:38:55 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/895933007/200001
5 years, 10 months ago (2015-02-10 23:54:47 UTC) #18
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 10 months ago (2015-02-11 01:23:32 UTC) #19
commit-bot: I haz the power
5 years, 10 months ago (2015-02-11 01:23:56 UTC) #20
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/8acaec3721c8f1b76004194be81612ee5ff08ecf
Cr-Commit-Position: refs/heads/master@{#315702}

Powered by Google App Engine
This is Rietveld 408576698