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

Unified Diff: net/url_request/url_fetcher.h

Issue 26230003: net: Allow URLFetcher users to inject custom URLFetcherResponseWriter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win7_aura compile error Created 7 years, 2 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/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher_core.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher.h
diff --git a/net/url_request/url_fetcher.h b/net/url_request/url_fetcher.h
index d888fbfd240bd108aa92effd337aea9d23bc8d9a..1de8bad0872b71e3c4b6b07199dd15df3d008bb7 100644
--- a/net/url_request/url_fetcher.h
+++ b/net/url_request/url_fetcher.h
@@ -10,6 +10,7 @@
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/supports_user_data.h"
#include "base/task_runner.h"
#include "net/base/net_export.h"
@@ -27,6 +28,7 @@ class HostPortPair;
class HttpRequestHeaders;
class HttpResponseHeaders;
class URLFetcherDelegate;
+class URLFetcherResponseWriter;
class URLRequestContextGetter;
class URLRequestStatus;
typedef std::vector<std::string> ResponseCookies;
@@ -239,6 +241,11 @@ class NET_EXPORT URLFetcher {
virtual void SaveResponseToTemporaryFile(
scoped_refptr<base::TaskRunner> file_task_runner) = 0;
+ // By default, the response is saved in a string. Call this method to use the
+ // specified writer to save the response. Must be called before Start().
+ virtual void SaveResponseWithWriter(
+ scoped_ptr<URLFetcherResponseWriter> response_writer) = 0;
+
// Retrieve the response headers from the request. Must only be called after
// the OnURLFetchComplete callback has run.
virtual HttpResponseHeaders* GetResponseHeaders() const = 0;
« no previous file with comments | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698