Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: net/base/network_delegate.cc

Issue 154473002: Support redirectUrl at onHeadersReceived in WebRequest / DWR API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix WebRequestRulesRegistrySimpleTest.StageChecker test Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/base/network_delegate.h ('k') | net/cronet/android/url_request_context_peer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « net/base/network_delegate.h ('k') | net/cronet/android/url_request_context_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698