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

Issue 12645004: Add Resource Handler for creating Streams to forward to extensions (Closed)

Created:
7 years, 9 months ago by Zachary Kuznia
Modified:
7 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, jam, chromium-apps-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add Resource Handler for creating Streams to forward to extensions BUG=171585 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189172

Patch Set 1 #

Patch Set 2 : Remove TODO #

Patch Set 3 : Some minor cleanup #

Total comments: 10

Patch Set 4 : Code review fixes #

Patch Set 5 : Rebase #

Total comments: 14

Patch Set 6 : Code review fixes #

Total comments: 2

Patch Set 7 : Code review fixes #

Patch Set 8 : Rebase #

Patch Set 9 : Add StreamHandle #

Patch Set 10 : Make sure things are called on the right thread. #

Total comments: 25

Patch Set 11 : Code review fixes #

Total comments: 1

Patch Set 12 : Remove NotifyWhenConsumed #

Patch Set 13 : Fix android and win builds #

Patch Set 14 : Disable Stream Resource Throttle #

Unified diffs Side-by-side diffs Delta from patch set Stats (+595 lines, -62 lines) Patch
M chrome/browser/extensions/api/streams_private/streams_private_api.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +23 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_private_api.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +39 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_resource_throttle.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_resource_throttle_browsertest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +105 lines, -12 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/extensions/api/streams_private.json View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/buffered_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +43 lines, -0 lines 0 comments Download
M content/browser/loader/resource_handler.h View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/loader/resource_loader.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/resource_request_info_impl.h View 3 chunks +6 lines, -0 lines 0 comments Download
M content/browser/loader/resource_request_info_impl.cc View 3 chunks +3 lines, -0 lines 0 comments Download
A + content/browser/loader/stream_resource_handler.h View 1 2 3 4 5 6 7 8 3 chunks +23 lines, -42 lines 0 comments Download
A content/browser/loader/stream_resource_handler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +118 lines, -0 lines 0 comments Download
M content/browser/streams/stream.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +11 lines, -0 lines 0 comments Download
M content/browser/streams/stream.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +26 lines, -1 line 0 comments Download
A content/browser/streams/stream_handle_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +40 lines, -0 lines 0 comments Download
A content/browser/streams/stream_handle_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +39 lines, -0 lines 0 comments Download
M content/browser/streams/stream_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/streams/stream_write_observer.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -0 lines 0 comments Download
M content/public/browser/resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +26 lines, -0 lines 0 comments Download
M content/public/browser/resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +19 lines, -0 lines 0 comments Download
A content/public/browser/stream_handle.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
Zachary Kuznia
Please take a look. Thanks, -Zach
7 years, 9 months ago (2013-03-13 09:06:49 UTC) #1
kinuko
Did a shallow review. The area's not very familiar to me but looks sane to ...
7 years, 9 months ago (2013-03-13 11:05:59 UTC) #2
Zachary Kuznia
https://codereview.chromium.org/12645004/diff/5001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/12645004/diff/5001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode99 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:99: // Goes through the extension's file browser handlers and ...
7 years, 9 months ago (2013-03-13 11:13:10 UTC) #3
Zachary Kuznia
Hi Darin, Could you take a look at this? This is the last patch to ...
7 years, 9 months ago (2013-03-13 15:39:20 UTC) #4
darin (slow to review)
https://chromiumcodereview.appspot.com/12645004/diff/18001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://chromiumcodereview.appspot.com/12645004/diff/18001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode102 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:102: bool CanHandleMimeType(const Extension* extension, nit: ExtensionCanHandleMimeType https://chromiumcodereview.appspot.com/12645004/diff/18001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode131 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:131: void ...
7 years, 9 months ago (2013-03-14 23:27:54 UTC) #5
Zachary Kuznia
https://chromiumcodereview.appspot.com/12645004/diff/18001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://chromiumcodereview.appspot.com/12645004/diff/18001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode102 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:102: bool CanHandleMimeType(const Extension* extension, On 2013/03/14 23:27:54, darin wrote: ...
7 years, 9 months ago (2013-03-15 00:22:24 UTC) #6
darin (slow to review)
https://chromiumcodereview.appspot.com/12645004/diff/25001/content/public/browser/resource_dispatcher_host_delegate.h File content/public/browser/resource_dispatcher_host_delegate.h (right): https://chromiumcodereview.appspot.com/12645004/diff/25001/content/public/browser/resource_dispatcher_host_delegate.h#newcode111 content/public/browser/resource_dispatcher_host_delegate.h:111: // be created for the resource. please document the ...
7 years, 9 months ago (2013-03-16 17:23:51 UTC) #7
Zachary Kuznia
https://chromiumcodereview.appspot.com/12645004/diff/25001/content/public/browser/resource_dispatcher_host_delegate.h File content/public/browser/resource_dispatcher_host_delegate.h (right): https://chromiumcodereview.appspot.com/12645004/diff/25001/content/public/browser/resource_dispatcher_host_delegate.h#newcode111 content/public/browser/resource_dispatcher_host_delegate.h:111: // be created for the resource. On 2013/03/16 17:23:51, ...
7 years, 9 months ago (2013-03-17 01:30:33 UTC) #8
darin (slow to review)
On Sat, Mar 16, 2013 at 6:30 PM, <zork@chromium.org> wrote: > > https://chromiumcodereview.**appspot.com/12645004/diff/** > 25001/content/public/browser/**resource_dispatcher_host_**delegate.h<https://chromiumcodereview.appspot.com/12645004/diff/25001/content/public/browser/resource_dispatcher_host_delegate.h> ...
7 years, 9 months ago (2013-03-17 03:48:23 UTC) #9
Zachary Kuznia
> I'm not a fan of timeouts. They lead to flaky behavior. What if the ...
7 years, 9 months ago (2013-03-17 04:35:07 UTC) #10
darin (slow to review)
Good point about TCP interruptions. Maybe consider downloads that are small? I agree this could ...
7 years, 9 months ago (2013-03-17 05:02:04 UTC) #11
Zachary Kuznia
On 2013/03/17 05:02:04, darin wrote: > Good point about TCP interruptions. Maybe consider downloads that ...
7 years, 9 months ago (2013-03-17 05:14:51 UTC) #12
darin (slow to review)
NOTE: We usually introduce interfaces in content/public/ corresponding to concrete classes we want to expose ...
7 years, 9 months ago (2013-03-17 05:58:45 UTC) #13
Zachary Kuznia
On 2013/03/17 05:58:45, darin wrote: > NOTE: We usually introduce interfaces in content/public/ corresponding to ...
7 years, 9 months ago (2013-03-17 06:07:54 UTC) #14
darin (slow to review)
Had you considered just exposing an object, and letting the lifetime of that object dictate ...
7 years, 9 months ago (2013-03-17 06:45:02 UTC) #15
Zachary Kuznia
On 2013/03/17 06:45:02, darin wrote: > Had you considered just exposing an object, and letting ...
7 years, 9 months ago (2013-03-17 19:00:35 UTC) #16
kinuko
https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc File chrome/browser/extensions/api/streams_private/streams_private_api.cc (right): https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc#newcode90 chrome/browser/extensions/api/streams_private/streams_private_api.cc:90: if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { (drive-by) UNLOADED event is ...
7 years, 9 months ago (2013-03-18 00:28:17 UTC) #17
Zachary Kuznia
https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc File chrome/browser/extensions/api/streams_private/streams_private_api.cc (right): https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc#newcode90 chrome/browser/extensions/api/streams_private/streams_private_api.cc:90: if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { On 2013/03/18 00:28:17, kinuko ...
7 years, 9 months ago (2013-03-18 01:06:55 UTC) #18
kinuko
https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc File chrome/browser/extensions/api/streams_private/streams_private_api.cc (right): https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc#newcode90 chrome/browser/extensions/api/streams_private/streams_private_api.cc:90: if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { On 2013/03/18 01:06:55, Zachary ...
7 years, 9 months ago (2013-03-18 01:46:17 UTC) #19
Zachary Kuznia
On 2013/03/18 01:46:17, kinuko wrote: > https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc > File chrome/browser/extensions/api/streams_private/streams_private_api.cc > (right): > > https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc#newcode90 ...
7 years, 9 months ago (2013-03-18 01:53:48 UTC) #20
darin (slow to review)
I think this is looking really great. Lot's of feedback, but hopefully helpful stuff... https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc ...
7 years, 9 months ago (2013-03-19 06:12:50 UTC) #21
Zachary Kuznia
https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc File chrome/browser/extensions/api/streams_private/streams_private_api.cc (right): https://codereview.chromium.org/12645004/diff/49001/chrome/browser/extensions/api/streams_private/streams_private_api.cc#newcode55 chrome/browser/extensions/api/streams_private/streams_private_api.cc:55: event_args->Append(new base::StringValue(mime_type)); On 2013/03/19 06:12:51, darin wrote: > it ...
7 years, 9 months ago (2013-03-19 06:59:35 UTC) #22
darin (slow to review)
LGTM https://codereview.chromium.org/12645004/diff/60002/chrome/browser/extensions/api/streams_private/streams_private_api.cc File chrome/browser/extensions/api/streams_private/streams_private_api.cc (right): https://codereview.chromium.org/12645004/diff/60002/chrome/browser/extensions/api/streams_private/streams_private_api.cc#newcode71 chrome/browser/extensions/api/streams_private/streams_private_api.cc:71: void StreamsPrivateAPI::OnStreamClosed(const std::string& extension_id, nit: OnStreamConsumed? Note: As ...
7 years, 9 months ago (2013-03-19 14:32:19 UTC) #23
Zachary Kuznia
On 2013/03/19 14:32:19, darin wrote: > LGTM > > https://codereview.chromium.org/12645004/diff/60002/chrome/browser/extensions/api/streams_private/streams_private_api.cc > File chrome/browser/extensions/api/streams_private/streams_private_api.cc > (right): ...
7 years, 9 months ago (2013-03-19 15:33:45 UTC) #24
darin (slow to review)
LGTM
7 years, 9 months ago (2013-03-19 16:34:06 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zork@chromium.org/12645004/82006
7 years, 9 months ago (2013-03-19 21:27:32 UTC) #26
commit-bot: I haz the power
7 years, 9 months ago (2013-03-20 00:26:49 UTC) #27
Message was sent while issue was closed.
Change committed as 189172

Powered by Google App Engine
This is Rietveld 408576698