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

Unified Diff: mojo/services/network/url_loader_impl.h

Issue 373373002: Mojo: Refactor URLLoader interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes per review Created 6 years, 5 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 | « mojo/services/launcher/launcher.cc ('k') | mojo/services/network/url_loader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/url_loader_impl.h
diff --git a/mojo/services/network/url_loader_impl.h b/mojo/services/network/url_loader_impl.h
index 93af0d460a23fbb5de8efe5477ff5dfa132193a5..68bad9adc5827a39a56b459824fa7bf300181dd0 100644
--- a/mojo/services/network/url_loader_impl.h
+++ b/mojo/services/network/url_loader_impl.h
@@ -33,8 +33,11 @@ class URLLoaderImpl : public InterfaceImpl<URLLoader>,
// URLLoader methods:
virtual void Start(
URLRequestPtr request,
- ScopedDataPipeProducerHandle response_body_stream) OVERRIDE;
- virtual void FollowRedirect() OVERRIDE;
+ const Callback<void(URLResponsePtr)>& callback) OVERRIDE;
+ virtual void FollowRedirect(
+ const Callback<void(URLResponsePtr)>& callback) OVERRIDE;
+ virtual void QueryStatus(
+ const Callback<void(URLLoaderStatusPtr)>& callback) OVERRIDE;
// net::URLRequest::Delegate methods:
virtual void OnReceivedRedirect(net::URLRequest* url_request,
@@ -44,7 +47,10 @@ class URLLoaderImpl : public InterfaceImpl<URLLoader>,
virtual void OnReadCompleted(net::URLRequest* url_request, int bytes_read)
OVERRIDE;
- void SendError(int error);
+ void SendError(
+ int error,
+ const Callback<void(URLResponsePtr)>& callback);
+ void SendResponse(URLResponsePtr response);
void OnResponseBodyStreamReady(MojoResult result);
void WaitToReadMore();
void ReadMore();
@@ -52,9 +58,11 @@ class URLLoaderImpl : public InterfaceImpl<URLLoader>,
NetworkContext* context_;
scoped_ptr<net::URLRequest> url_request_;
+ Callback<void(URLResponsePtr)> callback_;
ScopedDataPipeProducerHandle response_body_stream_;
scoped_refptr<PendingWriteToDataPipe> pending_write_;
common::HandleWatcher handle_watcher_;
+ uint32 response_body_buffer_size_;
bool auto_follow_redirects_;
base::WeakPtrFactory<URLLoaderImpl> weak_ptr_factory_;
« no previous file with comments | « mojo/services/launcher/launcher.cc ('k') | mojo/services/network/url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698