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

Issue 23223003: Chromium Blob hacking (Closed)

Created:
7 years, 4 months ago by michaeln
Modified:
7 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, tzik+watch_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, kinuko+watch
Visibility:
Public.

Description

Chromium Blob hacking Start using BlobStorageContext (and family) as a replacement for BlobStorageController. The new class manages blob data by uuid and seperately maintains a mapping from of public blob urls to uuids. Added a methods to create an additional mapping of old-style 'private urls' to new-style uuids to help with transitioning, blink needs to be retrofitted too, but that has to happen separately. Changed blob processing classes to take BlobDataHandles as input instead of GURLs. Not long after IPC deserizliation, get a BlobDataHandle and pass that around. - FileSystemOperation.Write (and famlity) for FileWriter support - ResourceDispatcherHost (and famility) for blob url requests - (PostMessage handling and WebIntent plumbing ultimately needs to be treated in this way too) Switched to using string uuids instead of urls in IPC messages (and structs carried in ipc messages). Until blink is retrofitted, the chromiums side supports both forms of identifying blobs (old-style private urls and new-style uuids). - FileSystemHostMsg_Write - webkit_base::DataElement (and consumers: BlobData, ResourceRequestBody) - blob registry/building ipc messages Implemented the WebKit::WebBlobRegistryImpl such that it can be invoked on any renderer/worker thread. Got more explicit about naming: FileSystemURL vs BlobUUID vs PublicBlobURL. Note: There are corresponding changes to be made in Blink, after which, the things annotated as deprecated in this CL can be removed. TBR=inferno BUG=174200 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220754 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221886

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Total comments: 60

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Total comments: 5

Patch Set 21 : #

Total comments: 3

Patch Set 22 : #

Patch Set 23 : #

Total comments: 6

Patch Set 24 : #

Patch Set 25 : rebased #

Patch Set 26 : again #

Patch Set 27 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+822 lines, -950 lines) Patch
M chrome/browser/sync_file_system/local/canned_syncable_file_system.h View 1 2 3 4 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/sync_file_system/local/canned_syncable_file_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 6 chunks +17 lines, -9 lines 0 comments Download
M chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +2 lines, -3 lines 0 comments Download
M content/browser/fileapi/chrome_blob_storage_context.h View 3 chunks +4 lines, -4 lines 0 comments Download
M content/browser/fileapi/chrome_blob_storage_context.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/fileapi/fileapi_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +29 lines, -11 lines 0 comments Download
M content/browser/fileapi/fileapi_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 10 chunks +83 lines, -29 lines 0 comments Download
M content/browser/fileapi/fileapi_message_filter_unittest.cc View 1 2 3 4 chunks +1 line, -36 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 5 chunks +20 lines, -7 lines 0 comments Download
M content/browser/loader/resource_request_info_impl.h View 1 2 3 3 chunks +0 lines, -12 lines 0 comments Download
M content/browser/loader/resource_request_info_impl.cc View 2 chunks +0 lines, -6 lines 0 comments Download
M content/browser/loader/upload_data_stream_builder.h View 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/loader/upload_data_stream_builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +28 lines, -24 lines 0 comments Download
M content/browser/loader/upload_data_stream_builder_unittest.cc View 1 2 3 4 5 6 7 8 9 11 chunks +27 lines, -30 lines 0 comments Download
M content/browser/net/view_blob_internals_job_factory.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/net/view_blob_internals_job_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/storage_partition_impl_map.cc View 1 2 3 4 5 6 1 chunk +19 lines, -63 lines 0 comments Download
M content/browser/webui/url_data_manager_backend.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/child/fileapi/file_system_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +8 lines, -1 line 0 comments Download
M content/child/fileapi/file_system_dispatcher.cc View 1 2 3 4 5 2 chunks +19 lines, -2 lines 0 comments Download
M content/child/fileapi/webfilewriter_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +8 lines, -2 lines 0 comments Download
M content/child/fileapi/webfilewriter_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +12 lines, -3 lines 0 comments Download
M content/child/fileapi/webfilewriter_base_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 5 chunks +43 lines, -2 lines 0 comments Download
M content/child/fileapi/webfilewriter_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +5 lines, -1 line 0 comments Download
M content/child/fileapi/webfilewriter_impl.cc View 3 chunks +26 lines, -4 lines 0 comments Download
M content/child/webblobregistry_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +12 lines, -1 line 0 comments Download
M content/child/webblobregistry_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +81 lines, -44 lines 0 comments Download
M content/common/fileapi/file_system_messages.h View 1 chunk +8 lines, -1 line 0 comments Download
M content/common/fileapi/webblob_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +24 lines, -19 lines 0 comments Download
M content/common/page_state_serialization.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M content/common/page_state_serialization.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +8 lines, -6 lines 0 comments Download
M content/common/page_state_serialization_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +2 lines, -1 line 0 comments Download
M content/common/resource_messages.cc View 3 chunks +10 lines, -3 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +0 lines, -1 line 0 comments Download
M content/public/renderer/history_item_serialization.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +4 lines, -4 lines 0 comments Download
M webkit/browser/blob/blob_data_handle.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/browser/blob/blob_storage_context.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -0 lines 0 comments Download
M webkit/browser/blob/blob_storage_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 3 chunks +27 lines, -1 line 0 comments Download
M webkit/browser/blob/blob_storage_context_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/browser/blob/blob_storage_controller.h View 1 2 3 1 chunk +0 lines, -82 lines 0 comments Download
M webkit/browser/blob/blob_storage_controller.cc View 1 2 3 1 chunk +0 lines, -257 lines 0 comments Download
M webkit/browser/blob/blob_storage_controller_unittest.cc View 1 2 3 1 chunk +0 lines, -77 lines 0 comments Download
M webkit/browser/blob/blob_storage_host.h View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -0 lines 0 comments Download
M webkit/browser/blob/blob_storage_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +55 lines, -0 lines 0 comments Download
M webkit/browser/blob/blob_url_request_job.cc View 1 chunk +2 lines, -1 line 0 comments Download
M webkit/browser/blob/blob_url_request_job_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +18 lines, -9 lines 0 comments Download
M webkit/browser/blob/blob_url_request_job_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +40 lines, -19 lines 0 comments Download
M webkit/browser/blob/mock_blob_url_request_context.h View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -7 lines 0 comments Download
M webkit/browser/blob/mock_blob_url_request_context.cc View 1 2 3 4 5 6 7 8 9 1 chunk +20 lines, -46 lines 0 comments Download
M webkit/browser/blob/view_blob_internals_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -4 lines 0 comments Download
M webkit/browser/blob/view_blob_internals_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 11 chunks +49 lines, -42 lines 0 comments Download
M webkit/browser/fileapi/file_system_operation_impl_write_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +24 lines, -36 lines 0 comments Download
M webkit/browser/fileapi/file_system_operation_runner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +3 lines, -2 lines 0 comments Download
M webkit/browser/fileapi/file_system_operation_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +8 lines, -4 lines 0 comments Download
M webkit/child/weburlloader_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +1 line, -1 line 0 comments Download
M webkit/common/data_element.h View 1 chunk +0 lines, -7 lines 0 comments Download
M webkit/common/resource_request_body.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M webkit/common/resource_request_body.cc View 1 1 chunk +6 lines, -1 line 0 comments Download
M webkit/storage_browser.gyp View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
michaeln
Hi, this is mostly mind numbing changes to replace BlobStorageController with BlobStorageContext and family. Maybe ...
7 years, 4 months ago (2013-08-20 23:59:29 UTC) #1
kinuko
Looking good. I'll take another look, but sending out first round comments https://codereview.chromium.org/23223003/diff/43001/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc ...
7 years, 4 months ago (2013-08-21 10:22:19 UTC) #2
michaeln
thnx for looking, i'll take care of the nits in the next upload https://codereview.chromium.org/23223003/diff/43001/content/browser/fileapi/fileapi_message_filter.cc File ...
7 years, 4 months ago (2013-08-21 17:57:00 UTC) #3
michaeln
I also have to wade thru the try results?
7 years, 4 months ago (2013-08-21 21:43:00 UTC) #4
ericu
https://codereview.chromium.org/23223003/diff/43001/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc File chrome/browser/sync_file_system/local/canned_syncable_file_system.cc (right): https://codereview.chromium.org/23223003/diff/43001/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc#newcode648 chrome/browser/sync_file_system/local/canned_syncable_file_system.cc:648: const std::string blob_id(std::string("blob:") + data); What's this blob_id for? ...
7 years, 4 months ago (2013-08-21 23:26:08 UTC) #5
michaeln
Did some local testing and fixing, but haven't responded to comments just yet. Starting some ...
7 years, 4 months ago (2013-08-22 22:32:34 UTC) #6
michaeln
Ptal. There's one test that i have to look more closely at, DownloadDangerousBlobData. https://codereview.chromium.org/23223003/diff/43001/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc File ...
7 years, 3 months ago (2013-08-27 23:24:06 UTC) #7
michaeln
> There's one test that i have to look more closely at, DownloadDangerousBlobData. Done
7 years, 3 months ago (2013-08-28 01:27:36 UTC) #8
kinuko
https://codereview.chromium.org/23223003/diff/101001/content/child/fileapi/webfilewriter_impl.h File content/child/fileapi/webfilewriter_impl.h (right): https://codereview.chromium.org/23223003/diff/101001/content/child/fileapi/webfilewriter_impl.h#newcode37 content/child/fileapi/webfilewriter_impl.h:37: int64 offset) OVERRIDE; nit: indent https://codereview.chromium.org/23223003/diff/101001/webkit/browser/blob/blob_storage_host.cc File webkit/browser/blob/blob_storage_host.cc (right): ...
7 years, 3 months ago (2013-08-28 17:24:31 UTC) #9
michaeln
https://codereview.chromium.org/23223003/diff/101001/webkit/browser/blob/blob_storage_host.cc File webkit/browser/blob/blob_storage_host.cc (right): https://codereview.chromium.org/23223003/diff/101001/webkit/browser/blob/blob_storage_host.cc#newcode139 webkit/browser/blob/blob_storage_host.cc:139: ignore_result(DecrementBlobRefCount(uuid)); On 2013/08/28 17:24:31, kinuko wrote: > I'm lost ...
7 years, 3 months ago (2013-08-28 20:21:34 UTC) #10
michaeln
https://codereview.chromium.org/23223003/diff/101001/content/child/fileapi/webfilewriter_impl.h File content/child/fileapi/webfilewriter_impl.h (right): https://codereview.chromium.org/23223003/diff/101001/content/child/fileapi/webfilewriter_impl.h#newcode37 content/child/fileapi/webfilewriter_impl.h:37: int64 offset) OVERRIDE; On 2013/08/28 17:24:31, kinuko wrote: > ...
7 years, 3 months ago (2013-08-28 20:48:02 UTC) #11
ericu
https://codereview.chromium.org/23223003/diff/43001/content/browser/loader/upload_data_stream_builder.cc File content/browser/loader/upload_data_stream_builder.cc (right): https://codereview.chromium.org/23223003/diff/43001/content/browser/loader/upload_data_stream_builder.cc#newcode86 content/browser/loader/upload_data_stream_builder.cc:86: // Append the elements in the referred blob data. ...
7 years, 3 months ago (2013-08-28 22:01:27 UTC) #12
michaeln
https://codereview.chromium.org/23223003/diff/43001/content/browser/loader/upload_data_stream_builder.cc File content/browser/loader/upload_data_stream_builder.cc (right): https://codereview.chromium.org/23223003/diff/43001/content/browser/loader/upload_data_stream_builder.cc#newcode86 content/browser/loader/upload_data_stream_builder.cc:86: // Append the elements in the referred blob data. ...
7 years, 3 months ago (2013-08-28 22:54:47 UTC) #13
ericu
lgtm https://codereview.chromium.org/23223003/diff/119001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/23223003/diff/119001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode516 content/browser/loader/resource_dispatcher_host_impl.cc:516: On 2013/08/28 22:54:47, michaeln wrote: > On 2013/08/28 ...
7 years, 3 months ago (2013-08-28 23:02:04 UTC) #14
michaeln
+darin for content/ owners review
7 years, 3 months ago (2013-08-28 23:40:33 UTC) #15
kinuko
lgtm2 https://codereview.chromium.org/23223003/diff/101001/webkit/browser/blob/blob_storage_host.cc File webkit/browser/blob/blob_storage_host.cc (right): https://codereview.chromium.org/23223003/diff/101001/webkit/browser/blob/blob_storage_host.cc#newcode139 webkit/browser/blob/blob_storage_host.cc:139: ignore_result(DecrementBlobRefCount(uuid)); On 2013/08/28 20:21:34, michaeln wrote: > On ...
7 years, 3 months ago (2013-08-29 02:33:03 UTC) #16
michaeln
On 2013/08/29 02:33:03, kinuko wrote: > lgtm2 > > https://codereview.chromium.org/23223003/diff/101001/webkit/browser/blob/blob_storage_host.cc > File webkit/browser/blob/blob_storage_host.cc (right): > ...
7 years, 3 months ago (2013-08-29 21:30:57 UTC) #17
michaeln
The next small blink CL is on deck... https://codereview.chromium.org/23703003/
7 years, 3 months ago (2013-08-30 01:10:34 UTC) #18
darin (slow to review)
LGTM https://codereview.chromium.org/23223003/diff/149001/content/browser/net/view_blob_internals_job_factory.cc File content/browser/net/view_blob_internals_job_factory.cc (right): https://codereview.chromium.org/23223003/diff/149001/content/browser/net/view_blob_internals_job_factory.cc#newcode16 content/browser/net/view_blob_internals_job_factory.cc:16: return url.SchemeIs(chrome::kChromeUIScheme) && nit: indentation https://codereview.chromium.org/23223003/diff/149001/content/browser/net/view_blob_internals_job_factory.cc#newcode25 content/browser/net/view_blob_internals_job_factory.cc:25: return ...
7 years, 3 months ago (2013-08-30 19:55:32 UTC) #19
michaeln
thnx! https://codereview.chromium.org/23223003/diff/149001/content/browser/net/view_blob_internals_job_factory.cc File content/browser/net/view_blob_internals_job_factory.cc (right): https://codereview.chromium.org/23223003/diff/149001/content/browser/net/view_blob_internals_job_factory.cc#newcode16 content/browser/net/view_blob_internals_job_factory.cc:16: return url.SchemeIs(chrome::kChromeUIScheme) && On 2013/08/30 19:55:32, darin wrote: ...
7 years, 3 months ago (2013-08-30 21:08:43 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaeln@chromium.org/23223003/163001
7 years, 3 months ago (2013-08-30 21:56:11 UTC) #21
commit-bot: I haz the power
Change committed as 220754
7 years, 3 months ago (2013-09-01 23:06:09 UTC) #22
michaeln
oh well... just today discovered that it was reverted shortly after having landed. i'm not ...
7 years, 3 months ago (2013-09-06 22:25:03 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaeln@chromium.org/23223003/85001
7 years, 3 months ago (2013-09-07 01:22:21 UTC) #24
commit-bot: I haz the power
7 years, 3 months ago (2013-09-07 04:20:26 UTC) #25
Message was sent while issue was closed.
Change committed as 221886

Powered by Google App Engine
This is Rietveld 408576698