Commit 9df92afb authored by David Benjamin's avatar David Benjamin Committed by Commit Bot

Clean out deprecated hooks from NetworkDelegate.

Some of the Notify* functions don't even have implementations anymore.

Bug: none
Change-Id: I7f4c7c9abbe73baaa0eccc769cd3cc5286634658
Reviewed-on: https://chromium-review.googlesource.com/1087585
Commit-Queue: David Benjamin <davidben@chromium.org>
Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566630}
parent 8c60d0da
...@@ -207,19 +207,4 @@ bool NetworkDelegate::CanUseReportingClient(const url::Origin& origin, ...@@ -207,19 +207,4 @@ bool NetworkDelegate::CanUseReportingClient(const url::Origin& origin,
return OnCanUseReportingClient(origin, endpoint); return OnCanUseReportingClient(origin, endpoint);
} }
void NetworkDelegate::OnResponseStarted(URLRequest* request, int net_error) {
NOTREACHED();
}
void NetworkDelegate::OnCompleted(URLRequest* request,
bool started,
int net_error) {
OnCompleted(request, started);
}
// Deprecated.
void NetworkDelegate::OnCompleted(URLRequest* request, bool started) {
NOTREACHED();
}
} // namespace net } // namespace net
...@@ -87,13 +87,9 @@ class NET_EXPORT NetworkDelegate { ...@@ -87,13 +87,9 @@ class NET_EXPORT NetworkDelegate {
void NotifyBeforeRedirect(URLRequest* request, void NotifyBeforeRedirect(URLRequest* request,
const GURL& new_location); const GURL& new_location);
void NotifyResponseStarted(URLRequest* request, int net_error); void NotifyResponseStarted(URLRequest* request, int net_error);
// Deprecated.
void NotifyResponseStarted(URLRequest* request);
void NotifyNetworkBytesReceived(URLRequest* request, int64_t bytes_received); void NotifyNetworkBytesReceived(URLRequest* request, int64_t bytes_received);
void NotifyNetworkBytesSent(URLRequest* request, int64_t bytes_sent); void NotifyNetworkBytesSent(URLRequest* request, int64_t bytes_sent);
void NotifyCompleted(URLRequest* request, bool started, int net_error); void NotifyCompleted(URLRequest* request, bool started, int net_error);
// Deprecated.
void NotifyCompleted(URLRequest* request, bool started);
void NotifyURLRequestDestroyed(URLRequest* request); void NotifyURLRequestDestroyed(URLRequest* request);
void NotifyPACScriptError(int line_number, const base::string16& error); void NotifyPACScriptError(int line_number, const base::string16& error);
AuthRequiredResponse NotifyAuthRequired(URLRequest* request, AuthRequiredResponse NotifyAuthRequired(URLRequest* request,
...@@ -225,7 +221,7 @@ class NET_EXPORT NetworkDelegate { ...@@ -225,7 +221,7 @@ class NET_EXPORT NetworkDelegate {
const GURL& new_location) = 0; const GURL& new_location) = 0;
// This corresponds to URLRequestDelegate::OnResponseStarted. // This corresponds to URLRequestDelegate::OnResponseStarted.
virtual void OnResponseStarted(URLRequest* request, int net_error); virtual void OnResponseStarted(URLRequest* request, int net_error) = 0;
// Called when bytes are received from the network, such as after receiving // Called when bytes are received from the network, such as after receiving
// headers or reading raw response bytes. This includes localhost requests. // headers or reading raw response bytes. This includes localhost requests.
...@@ -250,9 +246,9 @@ class NET_EXPORT NetworkDelegate { ...@@ -250,9 +246,9 @@ class NET_EXPORT NetworkDelegate {
// Indicates that the URL request has been completed or failed. // Indicates that the URL request has been completed or failed.
// |started| indicates whether the request has been started. If false, // |started| indicates whether the request has been started. If false,
// some information like the socket address is not available. // some information like the socket address is not available.
virtual void OnCompleted(URLRequest* request, bool started, int net_error); virtual void OnCompleted(URLRequest* request,
// Deprecated. bool started,
virtual void OnCompleted(URLRequest* request, bool started); int net_error) = 0;
// Called when an URLRequest is being destroyed. Note that the request is // 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 // being deleted, so it's not safe to call any methods that may result in
......
...@@ -54,12 +54,7 @@ void NetworkDelegateImpl::OnNetworkBytesSent(URLRequest* request, ...@@ -54,12 +54,7 @@ void NetworkDelegateImpl::OnNetworkBytesSent(URLRequest* request,
void NetworkDelegateImpl::OnCompleted(URLRequest* request, void NetworkDelegateImpl::OnCompleted(URLRequest* request,
bool started, bool started,
int net_error) { int net_error) {}
OnCompleted(request, started);
}
// Deprecated.
void NetworkDelegateImpl::OnCompleted(URLRequest* request, bool started) {}
void NetworkDelegateImpl::OnURLRequestDestroyed(URLRequest* request) { void NetworkDelegateImpl::OnURLRequestDestroyed(URLRequest* request) {
} }
......
...@@ -72,7 +72,6 @@ class NET_EXPORT NetworkDelegateImpl : public NetworkDelegate { ...@@ -72,7 +72,6 @@ class NET_EXPORT NetworkDelegateImpl : public NetworkDelegate {
void OnNetworkBytesSent(URLRequest* request, int64_t bytes_sent) override; void OnNetworkBytesSent(URLRequest* request, int64_t bytes_sent) override;
void OnCompleted(URLRequest* request, bool started, int net_error) override; void OnCompleted(URLRequest* request, bool started, int net_error) override;
void OnCompleted(URLRequest* request, bool started) override;
void OnURLRequestDestroyed(URLRequest* request) override; void OnURLRequestDestroyed(URLRequest* request) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment