Index: net/base/network_delegate.cc |
diff --git a/net/base/network_delegate.cc b/net/base/network_delegate.cc |
index 5a69b863e62ef8394d9e646fbc102aea7d8f47bc..834769c84e170b73dadc30735964eb465772ff3e 100644 |
--- a/net/base/network_delegate.cc |
+++ b/net/base/network_delegate.cc |
@@ -6,6 +6,7 @@ |
#include "base/logging.h" |
#include "net/base/load_flags.h" |
+#include "net/base/net_errors.h" |
#include "net/url_request/url_request.h" |
namespace net { |
@@ -92,6 +93,21 @@ NetworkDelegate::AuthRequiredResponse NetworkDelegate::NotifyAuthRequired( |
return OnAuthRequired(request, auth_info, callback, credentials); |
} |
+int NetworkDelegate::NotifyBeforeSocketStreamConnect( |
+ SocketStream* socket, |
+ const CompletionCallback& callback) { |
+ DCHECK(CalledOnValidThread()); |
+ DCHECK(socket); |
+ DCHECK(!callback.is_null()); |
+ return OnBeforeSocketStreamConnect(socket, callback); |
+} |
+ |
+void NetworkDelegate::NotifyRequestWaitStateChange(const URLRequest& request, |
+ RequestWaitState state) { |
+ DCHECK(CalledOnValidThread()); |
+ OnRequestWaitStateChange(request, state); |
+} |
+ |
bool NetworkDelegate::CanGetCookies(const URLRequest& request, |
const CookieList& cookie_list) { |
DCHECK(CalledOnValidThread()); |
@@ -125,26 +141,93 @@ bool NetworkDelegate::CanEnablePrivacyMode( |
return OnCanEnablePrivacyMode(url, first_party_for_cookies); |
} |
+int NetworkDelegate::OnBeforeURLRequest(URLRequest* request, |
+ const CompletionCallback& callback, |
+ GURL* new_url) { |
+ return OK; |
+} |
+ |
+int NetworkDelegate::OnBeforeSendHeaders(URLRequest* request, |
+ const CompletionCallback& callback, |
+ HttpRequestHeaders* headers) { |
+ return OK; |
+} |
+ |
+void NetworkDelegate::OnSendHeaders(URLRequest* request, |
+ const HttpRequestHeaders& headers) { |
+} |
+ |
+int NetworkDelegate::OnHeadersReceived( |
+ URLRequest* request, |
+ const CompletionCallback& callback, |
+ const HttpResponseHeaders* original_response_headers, |
+ scoped_refptr<HttpResponseHeaders>* override_response_headers) { |
+ return OK; |
+} |
+ |
+void NetworkDelegate::OnBeforeRedirect(URLRequest* request, |
+ const GURL& new_location) { |
+} |
+ |
+void NetworkDelegate::OnResponseStarted(URLRequest* request) { |
+} |
+ |
+void NetworkDelegate::OnRawBytesRead(const URLRequest& request, |
+ int bytes_read) { |
+} |
+ |
+void NetworkDelegate::OnCompleted(URLRequest* request, bool started) { |
+} |
+ |
+void NetworkDelegate::OnURLRequestDestroyed(URLRequest* request) { |
+} |
+ |
+void NetworkDelegate::OnPACScriptError(int line_number, |
+ const base::string16& error) { |
+} |
+ |
+NetworkDelegate::AuthRequiredResponse NetworkDelegate::OnAuthRequired( |
+ URLRequest* request, |
+ const AuthChallengeInfo& auth_info, |
+ const AuthCallback& callback, |
+ AuthCredentials* credentials) { |
+ return AUTH_REQUIRED_RESPONSE_NO_ACTION; |
+} |
+ |
+bool NetworkDelegate::OnCanGetCookies(const URLRequest& request, |
+ const CookieList& cookie_list) { |
+ return true; |
+} |
+ |
+bool NetworkDelegate::OnCanSetCookie(const URLRequest& request, |
+ const std::string& cookie_line, |
+ CookieOptions* options) { |
+ return true; |
+} |
+ |
+bool NetworkDelegate::OnCanAccessFile(const URLRequest& request, |
+ const base::FilePath& path) const { |
+ return false; |
+} |
+ |
+bool NetworkDelegate::OnCanThrottleRequest(const URLRequest& request) const { |
+ return false; |
+} |
+ |
bool NetworkDelegate::OnCanEnablePrivacyMode( |
const GURL& url, |
const GURL& first_party_for_cookies) const { |
- // Default implementation disables privacy mode. |
return false; |
} |
-int NetworkDelegate::NotifyBeforeSocketStreamConnect( |
+int NetworkDelegate::OnBeforeSocketStreamConnect( |
SocketStream* socket, |
const CompletionCallback& callback) { |
- DCHECK(CalledOnValidThread()); |
- DCHECK(socket); |
- DCHECK(!callback.is_null()); |
- return OnBeforeSocketStreamConnect(socket, callback); |
+ return OK; |
} |
-void NetworkDelegate::NotifyRequestWaitStateChange(const URLRequest& request, |
- RequestWaitState state) { |
- DCHECK(CalledOnValidThread()); |
- OnRequestWaitStateChange(request, state); |
+void NetworkDelegate::OnRequestWaitStateChange(const URLRequest& request, |
+ RequestWaitState state) { |
} |
} // namespace net |