summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-24 02:39:54 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-24 02:39:54 +0000
commite993abfe81feaa374d476828a44942d296bdcc78 (patch)
tree201fffef0ba93ce41afaf2bd6e61e05b61c04028 /webkit/tools/test_shell
parent0afe80d755b899c188313629ea3f45f0fe5be981 (diff)
downloadchromium_src-e993abfe81feaa374d476828a44942d296bdcc78.zip
chromium_src-e993abfe81feaa374d476828a44942d296bdcc78.tar.gz
chromium_src-e993abfe81feaa374d476828a44942d296bdcc78.tar.bz2
revert r8603
Review URL: http://codereview.chromium.org/18576 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index e5b1aff..2f66f75 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -37,7 +37,6 @@
#include "base/thread.h"
#include "base/waitable_event.h"
#include "net/base/cookie_monster.h"
-#include "net/base/io_buffer.h"
#include "net/base/net_util.h"
#include "net/base/upload_data.h"
#include "net/url_request/url_request.h"
@@ -105,7 +104,7 @@ class RequestProxy : public URLRequest::Delegate,
public base::RefCountedThreadSafe<RequestProxy> {
public:
// Takes ownership of the params.
- RequestProxy() : buf_(new net::IOBuffer(kDataSize)) {
+ RequestProxy() {
}
virtual ~RequestProxy() {
@@ -156,7 +155,7 @@ class RequestProxy : public URLRequest::Delegate,
// Make a local copy of buf_, since AsyncReadData reuses it.
scoped_array<char> buf_copy(new char[bytes_read]);
- memcpy(buf_copy.get(), buf_->data(), bytes_read);
+ memcpy(buf_copy.get(), buf_, bytes_read);
// Continue reading more data into buf_
// Note: Doing this before notifying our peer ensures our load events get
@@ -212,7 +211,7 @@ class RequestProxy : public URLRequest::Delegate,
if (request_->status().is_success()) {
int bytes_read;
- if (request_->Read(buf_, kDataSize, &bytes_read) && bytes_read) {
+ if (request_->Read(buf_, sizeof(buf_), &bytes_read) && bytes_read) {
OnReceivedData(bytes_read);
} else if (!request_->status().is_io_pending()) {
Done();
@@ -297,7 +296,7 @@ class RequestProxy : public URLRequest::Delegate,
static const int kDataSize = 16*1024;
// read buffer for async IO
- scoped_refptr<net::IOBuffer> buf_;
+ char buf_[kDataSize];
MessageLoop* owner_loop_;
@@ -334,7 +333,7 @@ class SyncRequestProxy : public RequestProxy {
}
virtual void OnReceivedData(int bytes_read) {
- result_->data.append(buf_->data(), bytes_read);
+ result_->data.append(buf_, bytes_read);
AsyncReadData(); // read more (may recurse)
}