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

Issue 18390: Change URLRequest to use a ref-counted buffer for actual IO.... (Closed)

Created:
11 years, 11 months ago by rvargas (doing something else)
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Change URLRequest to use a ref-counted buffer for actual IO.The ref-counting will prevent the deletion / reuse of memorywhile the buffer is actually being used by pending IO.This seems a very intrusive change, but at least we will be ableto make sure that it works without having to chase every singledestruction of an URLRequest to make sure that any pending IOwas cancelled, and also allows us to avoid blocking onthe object destruction.BUG=5325 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=8603

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 43

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 7

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+408 lines, -231 lines) Patch
M chrome/browser/automation/url_request_slow_download_job.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/automation/url_request_slow_download_job.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chrome_plugin_host.cc View 1 2 3 4 5 4 chunks +32 lines, -5 lines 0 comments Download
M chrome/browser/dom_ui/chrome_url_data_manager.cc View 1 2 3 4 5 7 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/download/download_file.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/download/download_file.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/download/save_file_manager.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/download/save_file_manager.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/download/save_package.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/net/url_fetcher.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/net/url_fetcher.cc View 1 2 3 4 5 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/plugin_process_host.cc View 1 2 3 4 5 6 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/async_resource_handler.h View 1 2 3 4 5 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/async_resource_handler.cc View 1 2 3 4 5 4 chunks +34 lines, -15 lines 0 comments Download
M chrome/browser/renderer_host/buffered_resource_handler.h View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/buffered_resource_handler.cc View 1 2 3 4 5 6 chunks +22 lines, -11 lines 0 comments Download
M chrome/browser/renderer_host/cross_site_resource_handler.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/cross_site_resource_handler.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/download_resource_handler.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/download_resource_handler.cc View 1 2 3 4 5 6 chunks +11 lines, -9 lines 0 comments Download
M chrome/browser/renderer_host/download_throttling_resource_handler.h View 1 2 3 4 5 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/download_throttling_resource_handler.cc View 1 2 3 4 5 4 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/resource_handler.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/save_file_resource_handler.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/save_file_resource_handler.cc View 1 2 3 4 5 4 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/renderer_host/sync_resource_handler.h View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/sync_resource_handler.cc View 1 2 3 4 5 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/common/chrome_plugin_unittest.cc View 1 2 3 4 5 5 chunks +7 lines, -5 lines 0 comments Download
M chrome/common/net/url_request_intercept_job.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/net/url_request_intercept_job.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M net/base/bzip2_filter_unittest.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M net/base/completion_callback.h View 2 3 4 5 3 chunks +17 lines, -0 lines 0 comments Download
M net/base/filter.h View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M net/base/filter.cc View 1 2 3 4 5 3 chunks +4 lines, -4 lines 0 comments Download
M net/base/gzip_filter_unittest.cc View 1 2 3 4 5 5 chunks +8 lines, -5 lines 0 comments Download
A net/base/io_buffer.h View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
M net/base/sdch_filter_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M net/build/net.vcproj View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M net/http/http_cache.cc View 2 3 4 5 4 chunks +11 lines, -7 lines 0 comments Download
M net/http/http_cache_unittest.cc View 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M net/http/http_network_transaction.h View 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M net/http/http_network_transaction.cc View 2 3 4 5 5 chunks +5 lines, -5 lines 0 comments Download
M net/http/http_transaction.h View 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M net/http/http_transaction_unittest.h View 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M net/http/http_transaction_unittest.cc View 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M net/net_lib.scons View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M net/proxy/proxy_script_fetcher.cc View 1 2 3 4 5 4 chunks +5 lines, -2 lines 0 comments Download
M net/url_request/mime_sniffer_proxy.h View 1 2 3 4 5 3 chunks +7 lines, -2 lines 0 comments Download
M net/url_request/mime_sniffer_proxy.cc View 1 2 3 4 5 5 chunks +10 lines, -6 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 3 chunks +11 lines, -10 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_file_dir_job.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_file_dir_job.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M net/url_request/url_request_file_job.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_file_job.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/url_request_inet_job.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_inet_job.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 5 4 chunks +4 lines, -3 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 5 5 chunks +6 lines, -4 lines 0 comments Download
M net/url_request/url_request_simple_job.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_simple_job.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_test_job.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_test_job.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M net/url_request/url_request_unittest.h View 1 2 3 4 5 6 chunks +9 lines, -6 lines 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 1 2 3 4 5 6 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
rvargas (doing something else)
Matt, please take a look at the Gears related files.
11 years, 11 months ago (2009-01-21 03:54:04 UTC) #1
darin (slow to review)
good stuff! http://codereview.chromium.org/18390/diff/258/295 File chrome/browser/chrome_plugin_host.cc (right): http://codereview.chromium.org/18390/diff/258/295#newcode168 Line 168: CHECK(!my_buffer_.get()); why CHECK and not DCHECK? ...
11 years, 11 months ago (2009-01-21 17:27:12 UTC) #2
eroman
Have you considered adding a size() method to IOBuffer? And then removing the |buf_len| parameter ...
11 years, 11 months ago (2009-01-21 19:45:35 UTC) #3
Matt Perry
http://codereview.chromium.org/18390/diff/258/295 File chrome/browser/chrome_plugin_host.cc (right): http://codereview.chromium.org/18390/diff/258/295#newcode174 Line 174: memcpy(dest, my_buffer_->buffer(), *bytes_read); On 2009/01/21 17:27:13, darin wrote: ...
11 years, 11 months ago (2009-01-21 21:42:00 UTC) #4
rvargas (doing something else)
Thanks for all the comments. I made some comments here. I'll be making the code ...
11 years, 11 months ago (2009-01-21 22:19:28 UTC) #5
darin (slow to review)
http://codereview.chromium.org/18390/diff/258/295 File chrome/browser/chrome_plugin_host.cc (right): http://codereview.chromium.org/18390/diff/258/295#newcode168 Line 168: CHECK(!my_buffer_.get()); OK, yeah... I do see a lot ...
11 years, 11 months ago (2009-01-21 22:47:10 UTC) #6
Matt Perry
http://codereview.chromium.org/18390/diff/258/295 File chrome/browser/chrome_plugin_host.cc (right): http://codereview.chromium.org/18390/diff/258/295#newcode168 Line 168: CHECK(!my_buffer_.get()); On 2009/01/21 22:47:10, darin wrote: > OK, ...
11 years, 11 months ago (2009-01-21 23:02:11 UTC) #7
darin (slow to review)
> What do you think about adding capacity(), size() and set_size() > members to IOBuffer ...
11 years, 11 months ago (2009-01-22 16:00:06 UTC) #8
rvargas (doing something else)
All previous comments should be addressed with this new version. I changed IOBuffer to be ...
11 years, 11 months ago (2009-01-23 01:05:50 UTC) #9
rvargas (doing something else)
On 2009/01/23 01:05:50, rvargas wrote: > Please take another look :) (rev 4 was just ...
11 years, 11 months ago (2009-01-23 01:08:02 UTC) #10
Matt Perry
lgtm (I only looked at the CPAPI-related changes)
11 years, 11 months ago (2009-01-23 01:10:16 UTC) #11
darin (slow to review)
http://codereview.chromium.org/18390/diff/195/576 File net/base/completion_callback.h (right): http://codereview.chromium.org/18390/diff/195/576#newcode64 Line 64: CompletionCallbackImpl<T>::RunWithParams(params); don't we need to release the buffer ...
11 years, 11 months ago (2009-01-23 17:01:25 UTC) #12
rvargas (doing something else)
http://codereview.chromium.org/18390/diff/195/576 File net/base/completion_callback.h (right): http://codereview.chromium.org/18390/diff/195/576#newcode64 Line 64: CompletionCallbackImpl<T>::RunWithParams(params); On 2009/01/23 17:01:25, darin wrote: > don't ...
11 years, 11 months ago (2009-01-23 19:08:19 UTC) #13
darin (slow to review)
11 years, 11 months ago (2009-01-23 20:48:47 UTC) #14
LGTM

http://codereview.chromium.org/18390/diff/195/572
File net/http/http_cache.cc (right):

http://codereview.chromium.org/18390/diff/195/572#newcode445
Line 445: cache_read_callback_->UseBuffer(buf);
OK

Powered by Google App Engine
This is Rietveld 408576698