OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/domain_reliability/monitor.h" | 5 #include "components/domain_reliability/monitor.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 if (!request.response_info.was_cached && | 273 if (!request.response_info.was_cached && |
274 !request.response_info.was_fetched_via_proxy) { | 274 !request.response_info.was_fetched_via_proxy) { |
275 beacon.server_ip = request.response_info.socket_address.host(); | 275 beacon.server_ip = request.response_info.socket_address.host(); |
276 } | 276 } |
277 beacon.protocol = GetDomainReliabilityProtocol( | 277 beacon.protocol = GetDomainReliabilityProtocol( |
278 request.response_info.connection_info, | 278 request.response_info.connection_info, |
279 request.response_info.ssl_info.is_valid()); | 279 request.response_info.ssl_info.is_valid()); |
280 beacon.http_response_code = response_code; | 280 beacon.http_response_code = response_code; |
281 beacon.start_time = request.load_timing_info.request_start; | 281 beacon.start_time = request.load_timing_info.request_start; |
282 beacon.elapsed = time_->NowTicks() - beacon.start_time; | 282 beacon.elapsed = time_->NowTicks() - beacon.start_time; |
| 283 beacon.was_proxied = request.response_info.was_fetched_via_proxy; |
283 beacon.domain = request.url.host(); | 284 beacon.domain = request.url.host(); |
284 context_manager_.RouteBeacon(request.url, beacon); | 285 context_manager_.RouteBeacon(request.url, beacon); |
285 } | 286 } |
286 | 287 |
287 base::WeakPtr<DomainReliabilityMonitor> | 288 base::WeakPtr<DomainReliabilityMonitor> |
288 DomainReliabilityMonitor::MakeWeakPtr() { | 289 DomainReliabilityMonitor::MakeWeakPtr() { |
289 return weak_factory_.GetWeakPtr(); | 290 return weak_factory_.GetWeakPtr(); |
290 } | 291 } |
291 | 292 |
292 } // namespace domain_reliability | 293 } // namespace domain_reliability |
OLD | NEW |