OLD | NEW |
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" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/power_monitor/power_monitor.h" | 13 #include "base/power_monitor/power_monitor.h" |
14 #include "base/profiler/scoped_tracker.h" | 14 #include "base/profiler/scoped_tracker.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
20 #include "base/values.h" | 20 #include "base/values.h" |
21 #include "net/base/auth.h" | 21 #include "net/base/auth.h" |
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.h" |
| 31 #include "net/log/net_log_capture_mode.h" |
30 #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" |
31 #include "net/nqe/network_quality_estimator.h" | 34 #include "net/nqe/network_quality_estimator.h" |
32 #include "net/url_request/url_request_context.h" | 35 #include "net/url_request/url_request_context.h" |
33 | 36 |
34 namespace net { | 37 namespace net { |
35 | 38 |
36 namespace { | 39 namespace { |
37 | 40 |
38 // Callback for TYPE_URL_REQUEST_FILTERS_SET net-internals event. | 41 // Callback for TYPE_URL_REQUEST_FILTERS_SET net-internals event. |
39 std::unique_ptr<base::Value> FiltersSetCallback( | 42 std::unique_ptr<base::Value> FiltersSetCallback( |
40 Filter* filter, | 43 Filter* filter, |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 int64_t total_sent_bytes = GetTotalSentBytes(); | 997 int64_t total_sent_bytes = GetTotalSentBytes(); |
995 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_); | 998 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_); |
996 if (total_sent_bytes > last_notified_total_sent_bytes_) { | 999 if (total_sent_bytes > last_notified_total_sent_bytes_) { |
997 network_delegate_->NotifyNetworkBytesSent( | 1000 network_delegate_->NotifyNetworkBytesSent( |
998 request_, total_sent_bytes - last_notified_total_sent_bytes_); | 1001 request_, total_sent_bytes - last_notified_total_sent_bytes_); |
999 } | 1002 } |
1000 last_notified_total_sent_bytes_ = total_sent_bytes; | 1003 last_notified_total_sent_bytes_ = total_sent_bytes; |
1001 } | 1004 } |
1002 | 1005 |
1003 } // namespace net | 1006 } // namespace net |
OLD | NEW |