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

Side by Side Diff: net/url_request/url_request.cc

Issue 2334623003: Store net::ProxyServer in HttpResponseInfo object (Closed)
Patch Set: Rebased, fix compile error Created 4 years, 2 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/url_request/url_request.h ('k') | net/url_request/url_request_ftp_job_unittest.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/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 909
910 response_info_ = HttpResponseInfo(); 910 response_info_ = HttpResponseInfo();
911 response_info_.request_time = base::Time::Now(); 911 response_info_.request_time = base::Time::Now();
912 912
913 load_timing_info_ = LoadTimingInfo(); 913 load_timing_info_ = LoadTimingInfo();
914 load_timing_info_.request_start_time = response_info_.request_time; 914 load_timing_info_.request_start_time = response_info_.request_time;
915 load_timing_info_.request_start = base::TimeTicks::Now(); 915 load_timing_info_.request_start = base::TimeTicks::Now();
916 916
917 status_ = URLRequestStatus(); 917 status_ = URLRequestStatus();
918 is_pending_ = false; 918 is_pending_ = false;
919 proxy_server_ = HostPortPair(); 919 proxy_server_ = ProxyServer();
920 } 920 }
921 921
922 void URLRequest::OrphanJob() { 922 void URLRequest::OrphanJob() {
923 // When calling this function, please check that URLRequestHttpJob is 923 // When calling this function, please check that URLRequestHttpJob is
924 // not in between calling NetworkDelegate::NotifyHeadersReceived receiving 924 // not in between calling NetworkDelegate::NotifyHeadersReceived receiving
925 // the call back. This is currently guaranteed by the following strategies: 925 // the call back. This is currently guaranteed by the following strategies:
926 // - OrphanJob is called on JobRestart, in this case the URLRequestJob cannot 926 // - OrphanJob is called on JobRestart, in this case the URLRequestJob cannot
927 // be receiving any headers at that time. 927 // be receiving any headers at that time.
928 // - OrphanJob is called in ~URLRequest, in this case 928 // - OrphanJob is called in ~URLRequest, in this case
929 // NetworkDelegate::NotifyURLRequestDestroyed notifies the NetworkDelegate 929 // NetworkDelegate::NotifyURLRequestDestroyed notifies the NetworkDelegate
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 out->clear(); 1233 out->clear();
1234 } 1234 }
1235 1235
1236 void URLRequest::set_status(URLRequestStatus status) { 1236 void URLRequest::set_status(URLRequestStatus status) {
1237 DCHECK(status_.is_io_pending() || status_.is_success() || 1237 DCHECK(status_.is_io_pending() || status_.is_success() ||
1238 (!status.is_success() && !status.is_io_pending())); 1238 (!status.is_success() && !status.is_io_pending()));
1239 status_ = status; 1239 status_ = status;
1240 } 1240 }
1241 1241
1242 } // namespace net 1242 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_ftp_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698