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

Unified Diff: net/http/http_transaction_unittest.cc

Issue 18390: Change URLRequest to use a ref-counted buffer for actual IO.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_transaction_unittest.h ('k') | net/net_lib.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_transaction_unittest.cc
===================================================================
--- net/http/http_transaction_unittest.cc (revision 8565)
+++ net/http/http_transaction_unittest.cc (working copy)
@@ -137,12 +137,12 @@
std::string content;
do {
- char buf[256];
- rv = trans->Read(buf, sizeof(buf), &callback);
+ scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(256);
+ rv = trans->Read(buf, 256, &callback);
if (rv == net::ERR_IO_PENDING)
rv = callback.WaitForResult();
if (rv > 0) {
- content.append(buf, rv);
+ content.append(buf->data(), rv);
} else if (rv < 0) {
return rv;
}
« no previous file with comments | « net/http/http_transaction_unittest.h ('k') | net/net_lib.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698