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

Unified Diff: net/url_request/mime_sniffer_proxy.h

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/proxy/proxy_script_fetcher.cc ('k') | net/url_request/mime_sniffer_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/mime_sniffer_proxy.h
===================================================================
--- net/url_request/mime_sniffer_proxy.h (revision 8565)
+++ net/url_request/mime_sniffer_proxy.h (working copy)
@@ -19,6 +19,10 @@
// 2) ms_->mime_type() -- returns the sniffed mime type of the data;
// valid after OnResponseStarted() is called.
+#ifndef NET_URL_REQUEST_MIME_SNIFFER_PROXY_H_
+#define NET_URL_REQUEST_MIME_SNIFFER_PROXY_H_
+
+#include "net/base/io_buffer.h"
#include "net/url_request/url_request.h"
class MimeSnifferProxy : public URLRequest::Delegate {
@@ -48,7 +52,7 @@
}
// Wrapper around URLRequest::Read.
- bool Read(char* buf, int max_bytes, int *bytes_read);
+ bool Read(net::IOBuffer* buf, int max_bytes, int *bytes_read);
// Return the sniffed mime type of the request. Valid after
// OnResponseStarted() has been called on the delegate.
@@ -69,8 +73,9 @@
bool error_;
// A buffer for the first bit of the request.
- char buf_[1024];
+ scoped_refptr<net::IOBuffer> buf_;
// The number of bytes we've read into the buffer.
int bytes_read_;
};
+#endif // NET_URL_REQUEST_MIME_SNIFFER_PROXY_H_
« no previous file with comments | « net/proxy/proxy_script_fetcher.cc ('k') | net/url_request/mime_sniffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698