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

Unified Diff: net/url_request/url_fetcher_core.h

Issue 15711003: net: Move write flush responsiblity from URLFetcherResponseWriter to URLFetcherCore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 7 years, 7 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 | « no previous file | net/url_request/url_fetcher_core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher_core.h
diff --git a/net/url_request/url_fetcher_core.h b/net/url_request/url_fetcher_core.h
index 5ccd3ecda1c809738bc702d5c512050381a40214..9ea2335bfe333013ec7c4e2a44d9b29ba661d8fd 100644
--- a/net/url_request/url_fetcher_core.h
+++ b/net/url_request/url_fetcher_core.h
@@ -28,6 +28,7 @@ class SingleThreadTaskRunner;
} // namespace base
namespace net {
+class DrainableIOBuffer;
class HttpResponseHeaders;
class IOBuffer;
class URLFetcherDelegate;
@@ -193,8 +194,13 @@ class URLFetcherCore
void CompleteAddingUploadDataChunk(const std::string& data,
bool is_last_chunk);
- // Handles the result of WriteBuffer.
- void DidWriteBuffer(int result);
+ // Writes all bytes stored in |data| with |response_writer_|.
+ // Returns OK if all bytes in |data| get written synchronously. Otherwise,
+ // returns ERR_IO_PENDING or a network error code.
+ int WriteBuffer(scoped_refptr<DrainableIOBuffer> data);
+
+ // Used to implement WriteBuffer().
+ void DidWriteBuffer(scoped_refptr<DrainableIOBuffer> data, int result);
// Read response bytes from the request.
void ReadResponse();
« no previous file with comments | « no previous file | net/url_request/url_fetcher_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698