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

Side by Side Diff: net/url_request/url_request_job.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_job.h ('k') | net/url_request/url_request_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_job.h" 5 #include "net/url_request/url_request_job.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 14 matching lines...) Expand all
25 #include "net/base/load_states.h" 25 #include "net/base/load_states.h"
26 #include "net/base/net_errors.h" 26 #include "net/base/net_errors.h"
27 #include "net/base/network_delegate.h" 27 #include "net/base/network_delegate.h"
28 #include "net/filter/filter.h" 28 #include "net/filter/filter.h"
29 #include "net/http/http_response_headers.h" 29 #include "net/http/http_response_headers.h"
30 #include "net/log/net_log.h" 30 #include "net/log/net_log.h"
31 #include "net/log/net_log_capture_mode.h" 31 #include "net/log/net_log_capture_mode.h"
32 #include "net/log/net_log_event_type.h" 32 #include "net/log/net_log_event_type.h"
33 #include "net/log/net_log_with_source.h" 33 #include "net/log/net_log_with_source.h"
34 #include "net/nqe/network_quality_estimator.h" 34 #include "net/nqe/network_quality_estimator.h"
35 #include "net/proxy/proxy_server.h"
35 #include "net/url_request/url_request_context.h" 36 #include "net/url_request/url_request_context.h"
36 37
37 namespace net { 38 namespace net {
38 39
39 namespace { 40 namespace {
40 41
41 // Callback for TYPE_URL_REQUEST_FILTERS_SET net-internals event. 42 // Callback for TYPE_URL_REQUEST_FILTERS_SET net-internals event.
42 std::unique_ptr<base::Value> FiltersSetCallback( 43 std::unique_ptr<base::Value> FiltersSetCallback(
43 Filter* filter, 44 Filter* filter,
44 NetLogCaptureMode /* capture_mode */) { 45 NetLogCaptureMode /* capture_mode */) {
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 } 805 }
805 806
806 void URLRequestJob::DestroyFilters() { 807 void URLRequestJob::DestroyFilters() {
807 filter_.reset(); 808 filter_.reset();
808 } 809 }
809 810
810 const URLRequestStatus URLRequestJob::GetStatus() { 811 const URLRequestStatus URLRequestJob::GetStatus() {
811 return request_->status(); 812 return request_->status();
812 } 813 }
813 814
814 void URLRequestJob::SetProxyServer(const HostPortPair& proxy_server) { 815 void URLRequestJob::SetProxyServer(const ProxyServer& proxy_server) {
815 request_->proxy_server_ = proxy_server; 816 request_->proxy_server_ = proxy_server;
816 } 817 }
817 818
818 Error URLRequestJob::ReadRawDataForFilter(int* bytes_read) { 819 Error URLRequestJob::ReadRawDataForFilter(int* bytes_read) {
819 Error error = ERR_FAILED; 820 Error error = ERR_FAILED;
820 DCHECK(bytes_read); 821 DCHECK(bytes_read);
821 DCHECK(filter_.get()); 822 DCHECK(filter_.get());
822 823
823 *bytes_read = 0; 824 *bytes_read = 0;
824 825
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 int64_t total_sent_bytes = GetTotalSentBytes(); 998 int64_t total_sent_bytes = GetTotalSentBytes();
998 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_); 999 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_);
999 if (total_sent_bytes > last_notified_total_sent_bytes_) { 1000 if (total_sent_bytes > last_notified_total_sent_bytes_) {
1000 network_delegate_->NotifyNetworkBytesSent( 1001 network_delegate_->NotifyNetworkBytesSent(
1001 request_, total_sent_bytes - last_notified_total_sent_bytes_); 1002 request_, total_sent_bytes - last_notified_total_sent_bytes_);
1002 } 1003 }
1003 last_notified_total_sent_bytes_ = total_sent_bytes; 1004 last_notified_total_sent_bytes_ = total_sent_bytes;
1004 } 1005 }
1005 1006
1006 } // namespace net 1007 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_job.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698