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

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

Issue 1337113004: CHECK that URLRequestJobs are not orphaned while blocked by extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke comments Created 5 years, 3 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/layered_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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const HttpResponseHeaders* original_response_headers, 84 const HttpResponseHeaders* original_response_headers,
85 scoped_refptr<HttpResponseHeaders>* override_response_headers, 85 scoped_refptr<HttpResponseHeaders>* override_response_headers,
86 GURL* allowed_unsafe_redirect_url); 86 GURL* allowed_unsafe_redirect_url);
87 void NotifyBeforeRedirect(URLRequest* request, 87 void NotifyBeforeRedirect(URLRequest* request,
88 const GURL& new_location); 88 const GURL& new_location);
89 void NotifyResponseStarted(URLRequest* request); 89 void NotifyResponseStarted(URLRequest* request);
90 void NotifyNetworkBytesReceived(const URLRequest& request, 90 void NotifyNetworkBytesReceived(const URLRequest& request,
91 int64_t bytes_received); 91 int64_t bytes_received);
92 void NotifyCompleted(URLRequest* request, bool started); 92 void NotifyCompleted(URLRequest* request, bool started);
93 void NotifyURLRequestDestroyed(URLRequest* request); 93 void NotifyURLRequestDestroyed(URLRequest* request);
94 void NotifyURLRequestJobOrphaned(URLRequest* request);
94 void NotifyPACScriptError(int line_number, const base::string16& error); 95 void NotifyPACScriptError(int line_number, const base::string16& error);
95 AuthRequiredResponse NotifyAuthRequired(URLRequest* request, 96 AuthRequiredResponse NotifyAuthRequired(URLRequest* request,
96 const AuthChallengeInfo& auth_info, 97 const AuthChallengeInfo& auth_info,
97 const AuthCallback& callback, 98 const AuthCallback& callback,
98 AuthCredentials* credentials); 99 AuthCredentials* credentials);
99 bool CanGetCookies(const URLRequest& request, 100 bool CanGetCookies(const URLRequest& request,
100 const CookieList& cookie_list); 101 const CookieList& cookie_list);
101 bool CanSetCookie(const URLRequest& request, 102 bool CanSetCookie(const URLRequest& request,
102 const std::string& cookie_line, 103 const std::string& cookie_line,
103 CookieOptions* options); 104 CookieOptions* options);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Indicates that the URL request has been completed or failed. 216 // Indicates that the URL request has been completed or failed.
216 // |started| indicates whether the request has been started. If false, 217 // |started| indicates whether the request has been started. If false,
217 // some information like the socket address is not available. 218 // some information like the socket address is not available.
218 virtual void OnCompleted(URLRequest* request, bool started) = 0; 219 virtual void OnCompleted(URLRequest* request, bool started) = 0;
219 220
220 // Called when an URLRequest is being destroyed. Note that the request is 221 // Called when an URLRequest is being destroyed. Note that the request is
221 // being deleted, so it's not safe to call any methods that may result in 222 // being deleted, so it's not safe to call any methods that may result in
222 // a virtual method call. 223 // a virtual method call.
223 virtual void OnURLRequestDestroyed(URLRequest* request) = 0; 224 virtual void OnURLRequestDestroyed(URLRequest* request) = 0;
224 225
226 // Called when the current job for |request| is orphaned. This is a temporary
227 // callback to diagnose https://crbug.com/289715 and may not be used for other
228 // purposes. Note that it may be called after OnURLRequestDestroyed.
229 //
230 // TODO(davidben): Remove this once data has been gathered.
231 virtual void OnURLRequestJobOrphaned(URLRequest* request) = 0;
232
225 // Corresponds to ProxyResolverJSBindings::OnError. 233 // Corresponds to ProxyResolverJSBindings::OnError.
226 virtual void OnPACScriptError(int line_number, 234 virtual void OnPACScriptError(int line_number,
227 const base::string16& error) = 0; 235 const base::string16& error) = 0;
228 236
229 // Called when a request receives an authentication challenge 237 // Called when a request receives an authentication challenge
230 // specified by |auth_info|, and is unable to respond using cached 238 // specified by |auth_info|, and is unable to respond using cached
231 // credentials. |callback| and |credentials| must be non-NULL, and must 239 // credentials. |callback| and |credentials| must be non-NULL, and must
232 // be valid until OnURLRequestDestroyed is called for |request|. 240 // be valid until OnURLRequestDestroyed is called for |request|.
233 // 241 //
234 // The following return values are allowed: 242 // The following return values are allowed:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // header is stripped from the request. 297 // header is stripped from the request.
290 virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( 298 virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
291 const URLRequest& request, 299 const URLRequest& request,
292 const GURL& target_url, 300 const GURL& target_url,
293 const GURL& referrer_url) const = 0; 301 const GURL& referrer_url) const = 0;
294 }; 302 };
295 303
296 } // namespace net 304 } // namespace net
297 305
298 #endif // NET_BASE_NETWORK_DELEGATE_H_ 306 #endif // NET_BASE_NETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « net/base/layered_network_delegate.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698