| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 load_flags(request.load_flags()), | 270 load_flags(request.load_flags()), |
| 271 upload_depth( | 271 upload_depth( |
| 272 DomainReliabilityUploader::GetURLRequestUploadDepth(request)) { | 272 DomainReliabilityUploader::GetURLRequestUploadDepth(request)) { |
| 273 request.GetLoadTimingInfo(&load_timing_info); | 273 request.GetLoadTimingInfo(&load_timing_info); |
| 274 request.GetConnectionAttempts(&connection_attempts); | 274 request.GetConnectionAttempts(&connection_attempts); |
| 275 request.PopulateNetErrorDetails(&details); | 275 request.PopulateNetErrorDetails(&details); |
| 276 if (!request.GetRemoteEndpoint(&remote_endpoint)) | 276 if (!request.GetRemoteEndpoint(&remote_endpoint)) |
| 277 remote_endpoint = net::IPEndPoint(); | 277 remote_endpoint = net::IPEndPoint(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 DomainReliabilityMonitor::RequestInfo::RequestInfo(const RequestInfo& other) = |
| 281 default; |
| 282 |
| 280 DomainReliabilityMonitor::RequestInfo::~RequestInfo() {} | 283 DomainReliabilityMonitor::RequestInfo::~RequestInfo() {} |
| 281 | 284 |
| 282 // static | 285 // static |
| 283 bool DomainReliabilityMonitor::RequestInfo::ShouldReportRequest( | 286 bool DomainReliabilityMonitor::RequestInfo::ShouldReportRequest( |
| 284 const DomainReliabilityMonitor::RequestInfo& request) { | 287 const DomainReliabilityMonitor::RequestInfo& request) { |
| 285 // Don't report requests that weren't supposed to send cookies. | 288 // Don't report requests that weren't supposed to send cookies. |
| 286 if (request.load_flags & net::LOAD_DO_NOT_SEND_COOKIES) | 289 if (request.load_flags & net::LOAD_DO_NOT_SEND_COOKIES) |
| 287 return false; | 290 return false; |
| 288 | 291 |
| 289 // Report requests that accessed the network or failed with an error code | 292 // Report requests that accessed the network or failed with an error code |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 break; | 402 break; |
| 400 } | 403 } |
| 401 } | 404 } |
| 402 | 405 |
| 403 base::WeakPtr<DomainReliabilityMonitor> | 406 base::WeakPtr<DomainReliabilityMonitor> |
| 404 DomainReliabilityMonitor::MakeWeakPtr() { | 407 DomainReliabilityMonitor::MakeWeakPtr() { |
| 405 return weak_factory_.GetWeakPtr(); | 408 return weak_factory_.GetWeakPtr(); |
| 406 } | 409 } |
| 407 | 410 |
| 408 } // namespace domain_reliability | 411 } // namespace domain_reliability |
| OLD | NEW |