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

Side by Side Diff: components/domain_reliability/monitor.cc

Issue 1088933007: Domain Reliability: Add was_proxied field to beacons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « components/domain_reliability/context_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/domain_reliability/context_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698