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

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

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 | « content/shell/browser/shell_network_delegate.cc ('k') | net/base/network_delegate.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 #ifndef NET_BASE_NETWORK_DELEGATE_H_ 5 #ifndef NET_BASE_NETWORK_DELEGATE_H_
6 #define NET_BASE_NETWORK_DELEGATE_H_ 6 #define NET_BASE_NETWORK_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 GURL* new_url); 62 GURL* new_url);
63 int NotifyBeforeSendHeaders(URLRequest* request, 63 int NotifyBeforeSendHeaders(URLRequest* request,
64 const CompletionCallback& callback, 64 const CompletionCallback& callback,
65 HttpRequestHeaders* headers); 65 HttpRequestHeaders* headers);
66 void NotifySendHeaders(URLRequest* request, 66 void NotifySendHeaders(URLRequest* request,
67 const HttpRequestHeaders& headers); 67 const HttpRequestHeaders& headers);
68 int NotifyHeadersReceived( 68 int NotifyHeadersReceived(
69 URLRequest* request, 69 URLRequest* request,
70 const CompletionCallback& callback, 70 const CompletionCallback& callback,
71 const HttpResponseHeaders* original_response_headers, 71 const HttpResponseHeaders* original_response_headers,
72 scoped_refptr<HttpResponseHeaders>* override_response_headers); 72 scoped_refptr<HttpResponseHeaders>* override_response_headers,
73 GURL* allowed_unsafe_redirect_url);
73 void NotifyBeforeRedirect(URLRequest* request, 74 void NotifyBeforeRedirect(URLRequest* request,
74 const GURL& new_location); 75 const GURL& new_location);
75 void NotifyResponseStarted(URLRequest* request); 76 void NotifyResponseStarted(URLRequest* request);
76 void NotifyRawBytesRead(const URLRequest& request, int bytes_read); 77 void NotifyRawBytesRead(const URLRequest& request, int bytes_read);
77 void NotifyCompleted(URLRequest* request, bool started); 78 void NotifyCompleted(URLRequest* request, bool started);
78 void NotifyURLRequestDestroyed(URLRequest* request); 79 void NotifyURLRequestDestroyed(URLRequest* request);
79 void NotifyPACScriptError(int line_number, const base::string16& error); 80 void NotifyPACScriptError(int line_number, const base::string16& error);
80 AuthRequiredResponse NotifyAuthRequired(URLRequest* request, 81 AuthRequiredResponse NotifyAuthRequired(URLRequest* request,
81 const AuthChallengeInfo& auth_info, 82 const AuthChallengeInfo& auth_info,
82 const AuthCallback& callback, 83 const AuthCallback& callback,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // network, these must not be modified. |override_response_headers| can be set 134 // network, these must not be modified. |override_response_headers| can be set
134 // to new values, that should be considered as overriding 135 // to new values, that should be considered as overriding
135 // |original_response_headers|. 136 // |original_response_headers|.
136 // |callback|, |original_response_headers|, and |override_response_headers| 137 // |callback|, |original_response_headers|, and |override_response_headers|
137 // are only valid until OnURLRequestDestroyed is called for this request. 138 // are only valid until OnURLRequestDestroyed is called for this request.
138 // See OnBeforeURLRequest for return value description. Returns OK by default. 139 // See OnBeforeURLRequest for return value description. Returns OK by default.
139 virtual int OnHeadersReceived( 140 virtual int OnHeadersReceived(
140 URLRequest* request, 141 URLRequest* request,
141 const CompletionCallback& callback, 142 const CompletionCallback& callback,
142 const HttpResponseHeaders* original_response_headers, 143 const HttpResponseHeaders* original_response_headers,
143 scoped_refptr<HttpResponseHeaders>* override_response_headers); 144 scoped_refptr<HttpResponseHeaders>* override_response_headers,
145 GURL* allowed_unsafe_redirect_url);
144 146
145 // Called right after a redirect response code was received. 147 // Called right after a redirect response code was received.
146 // |new_location| is only valid until OnURLRequestDestroyed is called for this 148 // |new_location| is only valid until OnURLRequestDestroyed is called for this
147 // request. 149 // request.
148 virtual void OnBeforeRedirect(URLRequest* request, 150 virtual void OnBeforeRedirect(URLRequest* request,
149 const GURL& new_location); 151 const GURL& new_location);
150 152
151 // This corresponds to URLRequestDelegate::OnResponseStarted. 153 // This corresponds to URLRequestDelegate::OnResponseStarted.
152 virtual void OnResponseStarted(URLRequest* request); 154 virtual void OnResponseStarted(URLRequest* request);
153 155
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 226
225 // Called before a SocketStream tries to connect. 227 // Called before a SocketStream tries to connect.
226 // See OnBeforeURLRequest for return value description. Returns OK by default. 228 // See OnBeforeURLRequest for return value description. Returns OK by default.
227 virtual int OnBeforeSocketStreamConnect( 229 virtual int OnBeforeSocketStreamConnect(
228 SocketStream* socket, const CompletionCallback& callback); 230 SocketStream* socket, const CompletionCallback& callback);
229 }; 231 };
230 232
231 } // namespace net 233 } // namespace net
232 234
233 #endif // NET_BASE_NETWORK_DELEGATE_H_ 235 #endif // NET_BASE_NETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/shell/browser/shell_network_delegate.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698