summaryrefslogtreecommitdiffstats
path: root/content/browser/loader/stream_resource_handler.cc
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-15 19:38:18 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-15 19:38:18 +0000
commitef5306ef2dc2460f0a0af8498f80d712ab3ec0b6 (patch)
tree329dce616f82e857d3c323822d446e1ef6e657ce /content/browser/loader/stream_resource_handler.cc
parent0de673b86444c59ad7e45021a4cbc911afdaeffc (diff)
downloadchromium_src-ef5306ef2dc2460f0a0af8498f80d712ab3ec0b6.zip
chromium_src-ef5306ef2dc2460f0a0af8498f80d712ab3ec0b6.tar.gz
chromium_src-ef5306ef2dc2460f0a0af8498f80d712ab3ec0b6.tar.bz2
Clean up ResourceHandler API.
1. Move URLRequest member to ResourceHandler base class and add convenience functions for subclasses. 2. Make OnWillRead take a scoped_refptr to avoid leaking the buffer. (Attempt 2, after being reverted for possibly unrelated crashes.) BUG=295239 TEST=No behavior change. TBR=darin Review URL: https://codereview.chromium.org/26420005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/loader/stream_resource_handler.cc')
-rw-r--r--content/browser/loader/stream_resource_handler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/browser/loader/stream_resource_handler.cc b/content/browser/loader/stream_resource_handler.cc
index 1e2acc8..8c8aae0 100644
--- a/content/browser/loader/stream_resource_handler.cc
+++ b/content/browser/loader/stream_resource_handler.cc
@@ -19,7 +19,7 @@ StreamResourceHandler::StreamResourceHandler(
net::URLRequest* request,
StreamRegistry* registry,
const GURL& origin)
- : request_(request),
+ : ResourceHandler(request),
read_buffer_(NULL) {
// TODO(tyoshino): Find a way to share this with the blob URL creation in
// WebKit.
@@ -58,7 +58,7 @@ bool StreamResourceHandler::OnWillStart(int request_id,
}
bool StreamResourceHandler::OnWillRead(int request_id,
- net::IOBuffer** buf,
+ scoped_refptr<net::IOBuffer>* buf,
int* buf_size,
int min_size) {
static const int kReadBufSize = 32768;