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

Side by Side Diff: net/url_request/url_request_job.h

Issue 1097303003: Plumb ConnectionAttempts from HttpNetworkTransaction to URLRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: rebase Created 5 years, 7 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
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_URL_REQUEST_URL_REQUEST_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/power_monitor/power_observer.h" 15 #include "base/power_monitor/power_observer.h"
16 #include "net/base/host_port_pair.h" 16 #include "net/base/host_port_pair.h"
17 #include "net/base/load_states.h" 17 #include "net/base/load_states.h"
18 #include "net/base/net_export.h" 18 #include "net/base/net_export.h"
19 #include "net/base/request_priority.h" 19 #include "net/base/request_priority.h"
20 #include "net/base/upload_progress.h" 20 #include "net/base/upload_progress.h"
21 #include "net/cookies/canonical_cookie.h" 21 #include "net/cookies/canonical_cookie.h"
22 #include "net/socket/connection_attempts.h"
22 #include "net/url_request/redirect_info.h" 23 #include "net/url_request/redirect_info.h"
23 #include "net/url_request/url_request.h" 24 #include "net/url_request/url_request.h"
24 #include "url/gurl.h" 25 #include "url/gurl.h"
25 26
26 namespace net { 27 namespace net {
27 28
28 class AuthChallengeInfo; 29 class AuthChallengeInfo;
29 class AuthCredentials; 30 class AuthCredentials;
30 class CookieOptions; 31 class CookieOptions;
31 class Filter; 32 class Filter;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // base::PowerObserver methods: 220 // base::PowerObserver methods:
220 // We invoke URLRequestJob::Kill on suspend (crbug.com/4606). 221 // We invoke URLRequestJob::Kill on suspend (crbug.com/4606).
221 void OnSuspend() override; 222 void OnSuspend() override;
222 223
223 // Called after a NetworkDelegate has been informed that the URLRequest 224 // Called after a NetworkDelegate has been informed that the URLRequest
224 // will be destroyed. This is used to track that no pending callbacks 225 // will be destroyed. This is used to track that no pending callbacks
225 // exist at destruction time of the URLRequestJob, unless they have been 226 // exist at destruction time of the URLRequestJob, unless they have been
226 // canceled by an explicit NetworkDelegate::NotifyURLRequestDestroyed() call. 227 // canceled by an explicit NetworkDelegate::NotifyURLRequestDestroyed() call.
227 virtual void NotifyURLRequestDestroyed(); 228 virtual void NotifyURLRequestDestroyed();
228 229
230 // Populates |out| with the vector of connection attempts made at the socket
231 // layer in the course of executing the URLRequestJob. Should be called after
232 // the response has been sent or after the connection has failed.
Randy Smith (Not in Mondays) 2015/05/11 20:59:31 "response has been sent". Do you mean "response h
233 virtual void GetConnectionAttempts(ConnectionAttempts* out) const;
234
229 // Given |policy|, |referrer|, and |redirect_destination|, returns the 235 // Given |policy|, |referrer|, and |redirect_destination|, returns the
230 // referrer URL mandated by |request|'s referrer policy. 236 // referrer URL mandated by |request|'s referrer policy.
231 static GURL ComputeReferrerForRedirect(URLRequest::ReferrerPolicy policy, 237 static GURL ComputeReferrerForRedirect(URLRequest::ReferrerPolicy policy,
232 const std::string& referrer, 238 const std::string& referrer,
233 const GURL& redirect_destination); 239 const GURL& redirect_destination);
234 240
235 protected: 241 protected:
236 friend class base::RefCounted<URLRequestJob>; 242 friend class base::RefCounted<URLRequestJob>;
237 ~URLRequestJob() override; 243 ~URLRequestJob() override;
238 244
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 NetworkDelegate* network_delegate_; 435 NetworkDelegate* network_delegate_;
430 436
431 base::WeakPtrFactory<URLRequestJob> weak_factory_; 437 base::WeakPtrFactory<URLRequestJob> weak_factory_;
432 438
433 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 439 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
434 }; 440 };
435 441
436 } // namespace net 442 } // namespace net
437 443
438 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 444 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698