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

Unified Diff: net/base/network_delegate.h

Issue 2262653003: Make URLRequest::Read to return net errors or bytes read instead of a bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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
Index: net/base/network_delegate.h
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index 2deb9c585c8fc9c0ada2b90a00c1dce50e8c7b45..36bdde9995ae9e8b834e357c81ac089940bcb0d8 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -80,9 +80,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
GURL* allowed_unsafe_redirect_url);
void NotifyBeforeRedirect(URLRequest* request,
const GURL& new_location);
+ void NotifyResponseStarted(URLRequest* request, int net_error);
+ // Deprecated.
void NotifyResponseStarted(URLRequest* request);
void NotifyNetworkBytesReceived(URLRequest* request, int64_t bytes_received);
void NotifyNetworkBytesSent(URLRequest* request, int64_t bytes_sent);
+ void NotifyCompleted(URLRequest* request, bool started, int net_error);
+ // Deprecated.
void NotifyCompleted(URLRequest* request, bool started);
void NotifyURLRequestDestroyed(URLRequest* request);
void NotifyPACScriptError(int line_number, const base::string16& error);
@@ -185,7 +189,9 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& new_location) = 0;
// This corresponds to URLRequestDelegate::OnResponseStarted.
- virtual void OnResponseStarted(URLRequest* request) = 0;
+ virtual void OnResponseStarted(URLRequest* request, int net_error);
+ // Deprecated.
+ virtual void OnResponseStarted(URLRequest* request);
// Called when bytes are received from the network, such as after receiving
// headers or reading raw response bytes. This includes localhost requests.
@@ -210,7 +216,9 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
// Indicates that the URL request has been completed or failed.
// |started| indicates whether the request has been started. If false,
// some information like the socket address is not available.
- virtual void OnCompleted(URLRequest* request, bool started) = 0;
+ virtual void OnCompleted(URLRequest* request, bool started, int net_error);
+ // Deprecated.
+ virtual void OnCompleted(URLRequest* request, bool started);
// Called when an URLRequest is being destroyed. Note that the request is
// being deleted, so it's not safe to call any methods that may result in

Powered by Google App Engine
This is Rietveld 408576698