OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/base/network_delegate.h" | 5 #include "net/base/network_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/base/load_flags.h" | 8 #include "net/base/load_flags.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 void NetworkDelegate::NotifySendHeaders(URLRequest* request, | 32 void NetworkDelegate::NotifySendHeaders(URLRequest* request, |
33 const HttpRequestHeaders& headers) { | 33 const HttpRequestHeaders& headers) { |
34 DCHECK(CalledOnValidThread()); | 34 DCHECK(CalledOnValidThread()); |
35 OnSendHeaders(request, headers); | 35 OnSendHeaders(request, headers); |
36 } | 36 } |
37 | 37 |
38 int NetworkDelegate::NotifyHeadersReceived( | 38 int NetworkDelegate::NotifyHeadersReceived( |
39 URLRequest* request, | 39 URLRequest* request, |
40 const CompletionCallback& callback, | 40 const CompletionCallback& callback, |
41 const HttpResponseHeaders* original_response_headers, | 41 const HttpResponseHeaders* original_response_headers, |
42 scoped_refptr<HttpResponseHeaders>* override_response_headers) { | 42 scoped_refptr<HttpResponseHeaders>* override_response_headers, |
| 43 GURL* allowed_unsafe_redirect_url) { |
43 DCHECK(CalledOnValidThread()); | 44 DCHECK(CalledOnValidThread()); |
44 DCHECK(original_response_headers); | 45 DCHECK(original_response_headers); |
45 DCHECK(!callback.is_null()); | 46 DCHECK(!callback.is_null()); |
46 return OnHeadersReceived(request, callback, original_response_headers, | 47 return OnHeadersReceived(request, |
47 override_response_headers); | 48 callback, |
| 49 original_response_headers, |
| 50 override_response_headers, |
| 51 allowed_unsafe_redirect_url); |
48 } | 52 } |
49 | 53 |
50 void NetworkDelegate::NotifyResponseStarted(URLRequest* request) { | 54 void NetworkDelegate::NotifyResponseStarted(URLRequest* request) { |
51 DCHECK(CalledOnValidThread()); | 55 DCHECK(CalledOnValidThread()); |
52 DCHECK(request); | 56 DCHECK(request); |
53 OnResponseStarted(request); | 57 OnResponseStarted(request); |
54 } | 58 } |
55 | 59 |
56 void NetworkDelegate::NotifyRawBytesRead(const URLRequest& request, | 60 void NetworkDelegate::NotifyRawBytesRead(const URLRequest& request, |
57 int bytes_read) { | 61 int bytes_read) { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 152 } |
149 | 153 |
150 void NetworkDelegate::OnSendHeaders(URLRequest* request, | 154 void NetworkDelegate::OnSendHeaders(URLRequest* request, |
151 const HttpRequestHeaders& headers) { | 155 const HttpRequestHeaders& headers) { |
152 } | 156 } |
153 | 157 |
154 int NetworkDelegate::OnHeadersReceived( | 158 int NetworkDelegate::OnHeadersReceived( |
155 URLRequest* request, | 159 URLRequest* request, |
156 const CompletionCallback& callback, | 160 const CompletionCallback& callback, |
157 const HttpResponseHeaders* original_response_headers, | 161 const HttpResponseHeaders* original_response_headers, |
158 scoped_refptr<HttpResponseHeaders>* override_response_headers) { | 162 scoped_refptr<HttpResponseHeaders>* override_response_headers, |
| 163 GURL* allowed_unsafe_redirect_url) { |
159 return OK; | 164 return OK; |
160 } | 165 } |
161 | 166 |
162 void NetworkDelegate::OnBeforeRedirect(URLRequest* request, | 167 void NetworkDelegate::OnBeforeRedirect(URLRequest* request, |
163 const GURL& new_location) { | 168 const GURL& new_location) { |
164 } | 169 } |
165 | 170 |
166 void NetworkDelegate::OnResponseStarted(URLRequest* request) { | 171 void NetworkDelegate::OnResponseStarted(URLRequest* request) { |
167 } | 172 } |
168 | 173 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 return false; | 219 return false; |
215 } | 220 } |
216 | 221 |
217 int NetworkDelegate::OnBeforeSocketStreamConnect( | 222 int NetworkDelegate::OnBeforeSocketStreamConnect( |
218 SocketStream* socket, | 223 SocketStream* socket, |
219 const CompletionCallback& callback) { | 224 const CompletionCallback& callback) { |
220 return OK; | 225 return OK; |
221 } | 226 } |
222 | 227 |
223 } // namespace net | 228 } // namespace net |
OLD | NEW |