Chromium Code Reviews| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 const HttpRequestHeaders& headers) final; | 56 const HttpRequestHeaders& headers) final; |
| 57 int OnHeadersReceived( | 57 int OnHeadersReceived( |
| 58 URLRequest* request, | 58 URLRequest* request, |
| 59 const CompletionCallback& callback, | 59 const CompletionCallback& callback, |
| 60 const HttpResponseHeaders* original_response_headers, | 60 const HttpResponseHeaders* original_response_headers, |
| 61 scoped_refptr<HttpResponseHeaders>* override_response_headers, | 61 scoped_refptr<HttpResponseHeaders>* override_response_headers, |
| 62 GURL* allowed_unsafe_redirect_url) final; | 62 GURL* allowed_unsafe_redirect_url) final; |
| 63 void OnBeforeRedirect(URLRequest* request, const GURL& new_location) final; | 63 void OnBeforeRedirect(URLRequest* request, const GURL& new_location) final; |
| 64 void OnResponseStarted(URLRequest* request) final; | 64 void OnResponseStarted(URLRequest* request) final; |
| 65 void OnRawBytesRead(const URLRequest& request, int bytes_read) final; | 65 void OnRawBytesRead(const URLRequest& request, int bytes_read) final; |
| 66 void OnNetworkBytesReceived(const URLRequest& request, | |
| 67 int64 bytes_received) final; | |
|
bengr
2015/08/17 21:30:39
Use int64_t and include <stdint.h>. See https://co
sclittle
2015/08/17 23:35:13
Done.
| |
| 66 void OnCompleted(URLRequest* request, bool started) final; | 68 void OnCompleted(URLRequest* request, bool started) final; |
| 67 void OnURLRequestDestroyed(URLRequest* request) final; | 69 void OnURLRequestDestroyed(URLRequest* request) final; |
| 68 void OnPACScriptError(int line_number, const base::string16& error) final; | 70 void OnPACScriptError(int line_number, const base::string16& error) final; |
| 69 AuthRequiredResponse OnAuthRequired(URLRequest* request, | 71 AuthRequiredResponse OnAuthRequired(URLRequest* request, |
| 70 const AuthChallengeInfo& auth_info, | 72 const AuthChallengeInfo& auth_info, |
| 71 const AuthCallback& callback, | 73 const AuthCallback& callback, |
| 72 AuthCredentials* credentials) final; | 74 AuthCredentials* credentials) final; |
| 73 bool OnCanGetCookies(const URLRequest& request, | 75 bool OnCanGetCookies(const URLRequest& request, |
| 74 const CookieList& cookie_list) final; | 76 const CookieList& cookie_list) final; |
| 75 bool OnCanSetCookie(const URLRequest& request, | 77 bool OnCanSetCookie(const URLRequest& request, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 GURL* allowed_unsafe_redirect_url); | 119 GURL* allowed_unsafe_redirect_url); |
| 118 | 120 |
| 119 virtual void OnBeforeRedirectInternal(URLRequest* request, | 121 virtual void OnBeforeRedirectInternal(URLRequest* request, |
| 120 const GURL& new_location); | 122 const GURL& new_location); |
| 121 | 123 |
| 122 virtual void OnResponseStartedInternal(URLRequest* request); | 124 virtual void OnResponseStartedInternal(URLRequest* request); |
| 123 | 125 |
| 124 virtual void OnRawBytesReadInternal(const URLRequest& request, | 126 virtual void OnRawBytesReadInternal(const URLRequest& request, |
| 125 int bytes_read); | 127 int bytes_read); |
| 126 | 128 |
| 129 virtual void OnNetworkBytesReceivedInternal(const URLRequest& request, | |
| 130 int64 bytes_received); | |
|
bengr
2015/08/17 21:30:39
What does bytes_received mean? Does it include, e.
sclittle
2015/08/17 23:35:13
See comment in network_delegate.h.
| |
| 131 | |
| 127 virtual void OnCompletedInternal(URLRequest* request, bool started); | 132 virtual void OnCompletedInternal(URLRequest* request, bool started); |
| 128 | 133 |
| 129 virtual void OnURLRequestDestroyedInternal(URLRequest* request); | 134 virtual void OnURLRequestDestroyedInternal(URLRequest* request); |
| 130 | 135 |
| 131 virtual void OnPACScriptErrorInternal(int line_number, | 136 virtual void OnPACScriptErrorInternal(int line_number, |
| 132 const base::string16& error); | 137 const base::string16& error); |
| 133 | 138 |
| 134 virtual void OnCanGetCookiesInternal(const URLRequest& request, | 139 virtual void OnCanGetCookiesInternal(const URLRequest& request, |
| 135 const CookieList& cookie_list); | 140 const CookieList& cookie_list); |
| 136 | 141 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 157 const GURL& target_url, | 162 const GURL& target_url, |
| 158 const GURL& referrer_url) const; | 163 const GURL& referrer_url) const; |
| 159 | 164 |
| 160 private: | 165 private: |
| 161 scoped_ptr<NetworkDelegate> nested_network_delegate_; | 166 scoped_ptr<NetworkDelegate> nested_network_delegate_; |
| 162 }; | 167 }; |
| 163 | 168 |
| 164 } // namespace net | 169 } // namespace net |
| 165 | 170 |
| 166 #endif // NET_BASE_LAYERED_NETWORK_DELEGATE_H_ | 171 #endif // NET_BASE_LAYERED_NETWORK_DELEGATE_H_ |
| OLD | NEW |