Chromium Code Reviews| Index: net/base/network_delegate.h |
| diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h |
| index 2deb9c585c8fc9c0ada2b90a00c1dce50e8c7b45..e9cbd95bcb46ef07ff29525728de2238fba0a00a 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); |
| @@ -111,6 +115,11 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { |
| const GURL& target_url, |
| const GURL& referrer_url) const; |
| + protected: |
| + // Let NetworkDelegateImpl to set |not_implemented_| value. |
| + // See the comment bellow that explains what this value means. |
| + void set_implemented(bool value) { implemented_ = value; } |
| + |
| private: |
| // This is the interface for subclasses of NetworkDelegate to implement. These |
| // member functions will be called by the respective public notification |
| @@ -185,7 +194,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 +221,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 |
| @@ -290,6 +303,9 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { |
| const URLRequest& request, |
| const GURL& target_url, |
| const GURL& referrer_url) const = 0; |
| + |
| + // Used to distinguish whether modified a method is overridden by clients. |
| + bool implemented_; |
|
mmenke
2016/08/30 22:09:11
No longer used
maksims (do not use this acc)
2016/08/31 11:16:59
Hmm, interesting. I've seen build-bots has been fa
mmenke
2016/08/31 21:35:47
The checks don't detect class members that aren't
|
| }; |
| } // namespace net |