OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_BASE_LAYERED_NETWORK_DELEGATE_H_ | 5 #ifndef NET_BASE_LAYERED_NETWORK_DELEGATE_H_ |
6 #define NET_BASE_LAYERED_NETWORK_DELEGATE_H_ | 6 #define NET_BASE_LAYERED_NETWORK_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 int OnHeadersReceived( | 59 int OnHeadersReceived( |
60 URLRequest* request, | 60 URLRequest* request, |
61 const CompletionCallback& callback, | 61 const CompletionCallback& callback, |
62 const HttpResponseHeaders* original_response_headers, | 62 const HttpResponseHeaders* original_response_headers, |
63 scoped_refptr<HttpResponseHeaders>* override_response_headers, | 63 scoped_refptr<HttpResponseHeaders>* override_response_headers, |
64 GURL* allowed_unsafe_redirect_url) final; | 64 GURL* allowed_unsafe_redirect_url) final; |
65 void OnBeforeRedirect(URLRequest* request, const GURL& new_location) final; | 65 void OnBeforeRedirect(URLRequest* request, const GURL& new_location) final; |
66 void OnResponseStarted(URLRequest* request) final; | 66 void OnResponseStarted(URLRequest* request) final; |
67 void OnNetworkBytesReceived(const URLRequest& request, | 67 void OnNetworkBytesReceived(const URLRequest& request, |
68 int64_t bytes_received) final; | 68 int64_t bytes_received) final; |
| 69 void OnNetworkBytesSent(const URLRequest& request, int64_t bytes_sent) final; |
69 void OnCompleted(URLRequest* request, bool started) final; | 70 void OnCompleted(URLRequest* request, bool started) final; |
70 void OnURLRequestDestroyed(URLRequest* request) final; | 71 void OnURLRequestDestroyed(URLRequest* request) final; |
71 void OnURLRequestJobOrphaned(URLRequest* request) final; | 72 void OnURLRequestJobOrphaned(URLRequest* request) final; |
72 void OnPACScriptError(int line_number, const base::string16& error) final; | 73 void OnPACScriptError(int line_number, const base::string16& error) final; |
73 AuthRequiredResponse OnAuthRequired(URLRequest* request, | 74 AuthRequiredResponse OnAuthRequired(URLRequest* request, |
74 const AuthChallengeInfo& auth_info, | 75 const AuthChallengeInfo& auth_info, |
75 const AuthCallback& callback, | 76 const AuthCallback& callback, |
76 AuthCredentials* credentials) final; | 77 AuthCredentials* credentials) final; |
77 bool OnCanGetCookies(const URLRequest& request, | 78 bool OnCanGetCookies(const URLRequest& request, |
78 const CookieList& cookie_list) final; | 79 const CookieList& cookie_list) final; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 GURL* allowed_unsafe_redirect_url); | 122 GURL* allowed_unsafe_redirect_url); |
122 | 123 |
123 virtual void OnBeforeRedirectInternal(URLRequest* request, | 124 virtual void OnBeforeRedirectInternal(URLRequest* request, |
124 const GURL& new_location); | 125 const GURL& new_location); |
125 | 126 |
126 virtual void OnResponseStartedInternal(URLRequest* request); | 127 virtual void OnResponseStartedInternal(URLRequest* request); |
127 | 128 |
128 virtual void OnNetworkBytesReceivedInternal(const URLRequest& request, | 129 virtual void OnNetworkBytesReceivedInternal(const URLRequest& request, |
129 int64_t bytes_received); | 130 int64_t bytes_received); |
130 | 131 |
| 132 virtual void OnNetworkBytesSentInternal(const URLRequest& request, |
| 133 int64_t bytes_sent); |
| 134 |
131 virtual void OnCompletedInternal(URLRequest* request, bool started); | 135 virtual void OnCompletedInternal(URLRequest* request, bool started); |
132 | 136 |
133 virtual void OnURLRequestDestroyedInternal(URLRequest* request); | 137 virtual void OnURLRequestDestroyedInternal(URLRequest* request); |
134 | 138 |
135 virtual void OnPACScriptErrorInternal(int line_number, | 139 virtual void OnPACScriptErrorInternal(int line_number, |
136 const base::string16& error); | 140 const base::string16& error); |
137 | 141 |
138 virtual void OnCanGetCookiesInternal(const URLRequest& request, | 142 virtual void OnCanGetCookiesInternal(const URLRequest& request, |
139 const CookieList& cookie_list); | 143 const CookieList& cookie_list); |
140 | 144 |
(...skipping 20 matching lines...) Expand all Loading... |
161 const GURL& target_url, | 165 const GURL& target_url, |
162 const GURL& referrer_url) const; | 166 const GURL& referrer_url) const; |
163 | 167 |
164 private: | 168 private: |
165 scoped_ptr<NetworkDelegate> nested_network_delegate_; | 169 scoped_ptr<NetworkDelegate> nested_network_delegate_; |
166 }; | 170 }; |
167 | 171 |
168 } // namespace net | 172 } // namespace net |
169 | 173 |
170 #endif // NET_BASE_LAYERED_NETWORK_DELEGATE_H_ | 174 #endif // NET_BASE_LAYERED_NETWORK_DELEGATE_H_ |
OLD | NEW |