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

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

Issue 2334623003: Store net::ProxyServer in HttpResponseInfo object (Closed)
Patch Set: PS Created 4 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
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 11 matching lines...) Expand all
22 #include "net/base/host_port_pair.h" 22 #include "net/base/host_port_pair.h"
23 #include "net/base/io_buffer.h" 23 #include "net/base/io_buffer.h"
24 #include "net/base/load_flags.h" 24 #include "net/base/load_flags.h"
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_event_type.h" 30 #include "net/log/net_log_event_type.h"
31 #include "net/nqe/network_quality_estimator.h" 31 #include "net/nqe/network_quality_estimator.h"
32 #include "net/proxy/proxy_server.h"
32 #include "net/url_request/url_request_context.h" 33 #include "net/url_request/url_request_context.h"
33 34
34 namespace net { 35 namespace net {
35 36
36 namespace { 37 namespace {
37 38
38 // Callback for TYPE_URL_REQUEST_FILTERS_SET net-internals event. 39 // Callback for TYPE_URL_REQUEST_FILTERS_SET net-internals event.
39 std::unique_ptr<base::Value> FiltersSetCallback( 40 std::unique_ptr<base::Value> FiltersSetCallback(
40 Filter* filter, 41 Filter* filter,
41 NetLogCaptureMode /* capture_mode */) { 42 NetLogCaptureMode /* capture_mode */) {
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 } 812 }
812 813
813 void URLRequestJob::DestroyFilters() { 814 void URLRequestJob::DestroyFilters() {
814 filter_.reset(); 815 filter_.reset();
815 } 816 }
816 817
817 const URLRequestStatus URLRequestJob::GetStatus() { 818 const URLRequestStatus URLRequestJob::GetStatus() {
818 return request_->status(); 819 return request_->status();
819 } 820 }
820 821
821 void URLRequestJob::SetProxyServer(const HostPortPair& proxy_server) { 822 void URLRequestJob::SetProxyServer(const ProxyServer& proxy_server) {
822 request_->proxy_server_ = proxy_server; 823 request_->proxy_server_ = proxy_server;
823 } 824 }
824 825
825 Error URLRequestJob::ReadRawDataForFilter(int* bytes_read) { 826 Error URLRequestJob::ReadRawDataForFilter(int* bytes_read) {
826 Error error = ERR_FAILED; 827 Error error = ERR_FAILED;
827 DCHECK(bytes_read); 828 DCHECK(bytes_read);
828 DCHECK(filter_.get()); 829 DCHECK(filter_.get());
829 830
830 *bytes_read = 0; 831 *bytes_read = 0;
831 832
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 int64_t total_sent_bytes = GetTotalSentBytes(); 1004 int64_t total_sent_bytes = GetTotalSentBytes();
1004 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_); 1005 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_);
1005 if (total_sent_bytes > last_notified_total_sent_bytes_) { 1006 if (total_sent_bytes > last_notified_total_sent_bytes_) {
1006 network_delegate_->NotifyNetworkBytesSent( 1007 network_delegate_->NotifyNetworkBytesSent(
1007 request_, total_sent_bytes - last_notified_total_sent_bytes_); 1008 request_, total_sent_bytes - last_notified_total_sent_bytes_);
1008 } 1009 }
1009 last_notified_total_sent_bytes_ = total_sent_bytes; 1010 last_notified_total_sent_bytes_ = total_sent_bytes;
1010 } 1011 }
1011 1012
1012 } // namespace net 1013 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698