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

Issue 27168: IPC messages and changes to ResourceLoaderBridge to support resource loading for media (Closed)

Created:
11 years, 10 months ago by Alpha Left Google
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, scherkus (not reviewing), ralphl, fbarchard
Visibility:
Public.

Description

Highlights of changes: 1. Added entry to ResourceResponseHead so that it contains either a base::PlatformFile (OS_WIN) or base::FileDescriptor (OS_POSIX) for passing the file handle from browser to renderer process. 2. Also added IPC messages for reporting download progress and ACK message for it. ResourceLoaderBridge::Peer::OnDownloadProgress is added so that the peer is notified of the download progress in the renderer process. 3. Load flag to kick start the resource loading for media files. LOAD_MEDIA_RESOURCE is added so that ResourceDispatcherHost knows how to use a different ResourceHandler for handling media resource request.

Patch Set 1 #

Patch Set 2 : nits #

Total comments: 14

Patch Set 3 : comments by darin #

Patch Set 4 : darin's comments #

Patch Set 5 : comments #

Total comments: 2

Patch Set 6 : darin's comments #

Patch Set 7 : assert load flag in HttpCache #

Patch Set 8 : typo in comments #

Total comments: 4

Patch Set 9 : typo #

Total comments: 1

Patch Set 10 : fixing memory error #

Patch Set 11 : fix memory error #

Patch Set 12 : duplicate handle for linux/mac #

Total comments: 1

Patch Set 13 : dup #

Total comments: 4

Patch Set 14 : create new file handle in disk_cache #

Patch Set 15 : nits #

Patch Set 16 : use media request context #

Total comments: 32

Patch Set 17 : comments by agl & rvargas #

Total comments: 8

Patch Set 18 : comments by rvargas #

Patch Set 19 : add mac/linux build and fixed unit test failures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -22 lines) Patch
M chrome/browser/browser.scons View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/browser.vcproj View 14 15 16 17 18 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/profile.cc View 2 chunks +2 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/media_resource_handler.h View 14 15 16 17 18 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/media_resource_handler.cc View 14 15 16 17 18 1 chunk +98 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.h View 14 15 16 17 18 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.h View 14 15 16 17 18 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 14 15 16 17 18 6 chunks +21 lines, -1 line 0 comments Download
M chrome/chrome.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +6 lines, -1 line 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +15 lines, -3 lines 0 comments Download
M chrome/common/resource_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/resource_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +9 lines, -0 lines 0 comments Download
M net/base/load_flags.h View 1 2 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -0 lines 0 comments Download
M net/disk_cache/disk_cache.h View 14 15 16 17 18 2 chunks +6 lines, -7 lines 0 comments Download
M net/disk_cache/entry_impl.cc View 14 15 16 17 1 chunk +5 lines, -5 lines 0 comments Download
M net/http/http_cache.cc View 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +18 lines, -2 lines 0 comments Download
M net/http/http_cache_unittest.cc View 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_response_info.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -0 lines 0 comments Download
M webkit/glue/resource_loader_bridge.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
Alpha Left Google
This is a proposed change to support media resource loading using file handle for transportation ...
11 years, 10 months ago (2009-02-25 22:30:21 UTC) #1
darin (slow to review)
http://codereview.chromium.org/27168/diff/18/19 File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/27168/diff/18/19#newcode821 Line 821: response->response_head.response_data_file = request->response_data_file(); i think you need to ...
11 years, 10 months ago (2009-02-26 22:26:55 UTC) #2
Alpha Left Google
http://codereview.chromium.org/27168/diff/18/19 File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/27168/diff/18/19#newcode821 Line 821: response->response_head.response_data_file = request->response_data_file(); On 2009/02/26 22:26:56, darin wrote: ...
11 years, 10 months ago (2009-02-26 23:03:26 UTC) #3
darin (slow to review)
http://codereview.chromium.org/27168/diff/1027/50 File webkit/glue/resource_loader_bridge.h (right): http://codereview.chromium.org/27168/diff/1027/50#newcode113 Line 113: // NULL and serves as a notification of ...
11 years, 10 months ago (2009-02-26 23:23:34 UTC) #4
Alpha Left Google
http://codereview.chromium.org/27168/diff/1027/50 File webkit/glue/resource_loader_bridge.h (right): http://codereview.chromium.org/27168/diff/1027/50#newcode113 Line 113: // NULL and serves as a notification of ...
11 years, 10 months ago (2009-02-26 23:43:55 UTC) #5
darin (slow to review)
> Done. I should have explained it better. :) URLRequest actually doesn't have > much ...
11 years, 10 months ago (2009-02-26 23:55:50 UTC) #6
Alpha Left Google
On 2009/02/26 23:55:50, darin wrote: > > Done. I should have explained it better. :) ...
11 years, 10 months ago (2009-02-27 19:46:10 UTC) #7
darin (slow to review)
Looks good, but... http://codereview.chromium.org/27168/diff/1053/65 File net/http/http_cache.cc (right): http://codereview.chromium.org/27168/diff/1053/65#newcode608 Line 608: DCHECK(cache_->type() != HttpCache::MEDIA || we ...
11 years, 10 months ago (2009-02-27 22:31:36 UTC) #8
Alpha Left Google
http://codereview.chromium.org/27168/diff/1053/65 File net/http/http_cache.cc (right): http://codereview.chromium.org/27168/diff/1053/65#newcode608 Line 608: DCHECK(cache_->type() != HttpCache::MEDIA || On 2009/02/27 22:31:36, darin ...
11 years, 10 months ago (2009-02-27 22:49:00 UTC) #9
agl
http://codereview.chromium.org/27168/diff/1056/69 File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/27168/diff/1056/69#newcode818 Line 818: response->response_head.response_data_file.fd = request->response_data_file(); Note that the file descriptor ...
11 years, 9 months ago (2009-03-05 17:47:37 UTC) #10
Alpha Left Google
agl, darin, rvargas: Please look into http_cache.cc where the file handle is duplicated. http://codereview.chromium.org/27168/diff/4016/3042 File ...
11 years, 9 months ago (2009-03-05 23:47:31 UTC) #11
rvargas (doing something else)
http://codereview.chromium.org/27168/diff/4019/4027 File net/http/http_cache.cc (right): http://codereview.chromium.org/27168/diff/4019/4027#newcode822 Line 822: response_.response_data_file = dup(response_.response_data_file); I don't know how the ...
11 years, 9 months ago (2009-03-06 03:46:03 UTC) #12
agl
NACK To be clear: it looks like this code is trying to pass a handle ...
11 years, 9 months ago (2009-03-06 05:09:02 UTC) #13
Alpha Left Google
On 2009/03/06 05:09:02, agl wrote: > NACK > > To be clear: it looks like ...
11 years, 9 months ago (2009-03-06 05:57:54 UTC) #14
Alpha Left Google
On 2009/03/06 05:57:54, Alpha wrote: > On 2009/03/06 05:09:02, agl wrote: > > NACK > ...
11 years, 9 months ago (2009-03-06 17:32:10 UTC) #15
Alpha Left Google
agl, rvargas: entry_impl.cc, disk_cache.h You will find code of opening the cache file in entry_impl.cc ...
11 years, 9 months ago (2009-03-07 02:06:54 UTC) #16
agl
rvargas still to check the cache code. http://codereview.chromium.org/27168/diff/4072/3079 File chrome/browser/renderer_host/media_resource_handler.cc (right): http://codereview.chromium.org/27168/diff/4072/3079#newcode44 Line 44: // ...
11 years, 9 months ago (2009-03-09 18:02:31 UTC) #17
rvargas (doing something else)
http://codereview.chromium.org/27168/diff/4072/3079 File chrome/browser/renderer_host/media_resource_handler.cc (right): http://codereview.chromium.org/27168/diff/4072/3079#newcode6 Line 6: #include "chrome/browser/renderer_host/media_resource_handler.h" nit: this should be the first ...
11 years, 9 months ago (2009-03-09 20:15:48 UTC) #18
Alpha Left Google
http://codereview.chromium.org/27168/diff/4072/3079 File chrome/browser/renderer_host/media_resource_handler.cc (right): http://codereview.chromium.org/27168/diff/4072/3079#newcode6 Line 6: #include "chrome/browser/renderer_host/media_resource_handler.h" On 2009/03/09 20:15:49, rvargas wrote: > ...
11 years, 9 months ago (2009-03-09 21:28:40 UTC) #19
rvargas (doing something else)
http://codereview.chromium.org/27168/diff/4072/3079 File chrome/browser/renderer_host/media_resource_handler.cc (right): http://codereview.chromium.org/27168/diff/4072/3079#newcode98 Line 98: return handler_->OnReadCompleted(request_id, bytes_read); On 2009/03/09 21:28:40, Alpha wrote: ...
11 years, 9 months ago (2009-03-09 22:02:59 UTC) #20
rvargas (doing something else)
Sorry about this... a couple of extra small nits. http://codereview.chromium.org/27168/diff/3103/3117 File net/disk_cache/disk_cache.h (right): http://codereview.chromium.org/27168/diff/3103/3117#newcode163 Line ...
11 years, 9 months ago (2009-03-09 22:10:21 UTC) #21
Alpha Left Google
http://codereview.chromium.org/27168/diff/4072/3079 File chrome/browser/renderer_host/media_resource_handler.cc (right): http://codereview.chromium.org/27168/diff/4072/3079#newcode98 Line 98: return handler_->OnReadCompleted(request_id, bytes_read); On 2009/03/09 22:02:59, rvargas wrote: ...
11 years, 9 months ago (2009-03-09 22:21:55 UTC) #22
rvargas (doing something else)
11 years, 9 months ago (2009-03-11 04:19:35 UTC) #23
Sorry, I didn't realized you changed the code with the last message.

LGTM. The other option you can explore if you see too many messages going on is
to not forward the OnReadCompleted but avoid asking for another buffer next time
(not calling OnWillRead).

Powered by Google App Engine
This is Rietveld 408576698