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

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

Issue 1465503002: Revert of CHECK that URLRequestJobs are not orphaned while blocked by extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make git do the revert Created 5 years, 1 month 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(URLRequest* request, int64_t bytes_received); 90 void NotifyNetworkBytesReceived(URLRequest* request, int64_t bytes_received);
91 void NotifyNetworkBytesSent(URLRequest* request, int64_t bytes_sent); 91 void NotifyNetworkBytesSent(URLRequest* request, int64_t bytes_sent);
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);
95 void NotifyPACScriptError(int line_number, const base::string16& error); 94 void NotifyPACScriptError(int line_number, const base::string16& error);
96 AuthRequiredResponse NotifyAuthRequired(URLRequest* request, 95 AuthRequiredResponse NotifyAuthRequired(URLRequest* request,
97 const AuthChallengeInfo& auth_info, 96 const AuthChallengeInfo& auth_info,
98 const AuthCallback& callback, 97 const AuthCallback& callback,
99 AuthCredentials* credentials); 98 AuthCredentials* credentials);
100 bool CanGetCookies(const URLRequest& request, 99 bool CanGetCookies(const URLRequest& request,
101 const CookieList& cookie_list); 100 const CookieList& cookie_list);
102 bool CanSetCookie(const URLRequest& request, 101 bool CanSetCookie(const URLRequest& request,
103 const std::string& cookie_line, 102 const std::string& cookie_line,
104 CookieOptions* options); 103 CookieOptions* options);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // Indicates that the URL request has been completed or failed. 225 // Indicates that the URL request has been completed or failed.
227 // |started| indicates whether the request has been started. If false, 226 // |started| indicates whether the request has been started. If false,
228 // some information like the socket address is not available. 227 // some information like the socket address is not available.
229 virtual void OnCompleted(URLRequest* request, bool started) = 0; 228 virtual void OnCompleted(URLRequest* request, bool started) = 0;
230 229
231 // Called when an URLRequest is being destroyed. Note that the request is 230 // Called when an URLRequest is being destroyed. Note that the request is
232 // being deleted, so it's not safe to call any methods that may result in 231 // being deleted, so it's not safe to call any methods that may result in
233 // a virtual method call. 232 // a virtual method call.
234 virtual void OnURLRequestDestroyed(URLRequest* request) = 0; 233 virtual void OnURLRequestDestroyed(URLRequest* request) = 0;
235 234
236 // Called when the current job for |request| is orphaned. This is a temporary
237 // callback to diagnose https://crbug.com/289715 and may not be used for other
238 // purposes. Note that it may be called after OnURLRequestDestroyed.
239 //
240 // TODO(davidben): Remove this once data has been gathered.
241 virtual void OnURLRequestJobOrphaned(URLRequest* request) = 0;
242
243 // Corresponds to ProxyResolverJSBindings::OnError. 235 // Corresponds to ProxyResolverJSBindings::OnError.
244 virtual void OnPACScriptError(int line_number, 236 virtual void OnPACScriptError(int line_number,
245 const base::string16& error) = 0; 237 const base::string16& error) = 0;
246 238
247 // Called when a request receives an authentication challenge 239 // Called when a request receives an authentication challenge
248 // specified by |auth_info|, and is unable to respond using cached 240 // specified by |auth_info|, and is unable to respond using cached
249 // credentials. |callback| and |credentials| must be non-NULL, and must 241 // credentials. |callback| and |credentials| must be non-NULL, and must
250 // be valid until OnURLRequestDestroyed is called for |request|. 242 // be valid until OnURLRequestDestroyed is called for |request|.
251 // 243 //
252 // The following return values are allowed: 244 // The following return values are allowed:
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // header is stripped from the request. 300 // header is stripped from the request.
309 virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( 301 virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
310 const URLRequest& request, 302 const URLRequest& request,
311 const GURL& target_url, 303 const GURL& target_url,
312 const GURL& referrer_url) const = 0; 304 const GURL& referrer_url) const = 0;
313 }; 305 };
314 306
315 } // namespace net 307 } // namespace net
316 308
317 #endif // NET_BASE_NETWORK_DELEGATE_H_ 309 #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