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

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

Issue 1785143003: [Domain Reliability: Monitor] Report beacon if the go away is detected, regardless of request statu… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set sample rate to 1.0 if beacon is sent for receives goway for port migration Created 4 years, 9 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 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/beacon.h" 5 #include "components/domain_reliability/beacon.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "components/domain_reliability/util.h" 10 #include "components/domain_reliability/util.h"
(...skipping 25 matching lines...) Expand all
36 DictionaryValue* failure_value = new DictionaryValue(); 36 DictionaryValue* failure_value = new DictionaryValue();
37 failure_value->SetString("custom_error", 37 failure_value->SetString("custom_error",
38 net::ErrorToString(chrome_error)); 38 net::ErrorToString(chrome_error));
39 beacon_value->Set("failure_data", failure_value); 39 beacon_value->Set("failure_data", failure_value);
40 } 40 }
41 beacon_value->SetString("server_ip", server_ip); 41 beacon_value->SetString("server_ip", server_ip);
42 beacon_value->SetBoolean("was_proxied", was_proxied); 42 beacon_value->SetBoolean("was_proxied", was_proxied);
43 beacon_value->SetString("protocol", protocol); 43 beacon_value->SetString("protocol", protocol);
44 if (details.quic_broken) 44 if (details.quic_broken)
45 beacon_value->SetBoolean("quic_broken", details.quic_broken); 45 beacon_value->SetBoolean("quic_broken", details.quic_broken);
46 if (details.quic_port_migration_detected)
47 beacon_value->SetBoolean("quic_port_migration_detected",
48 details.quic_port_migration_detected);
46 if (http_response_code >= 0) 49 if (http_response_code >= 0)
47 beacon_value->SetInteger("http_response_code", http_response_code); 50 beacon_value->SetInteger("http_response_code", http_response_code);
48 beacon_value->SetInteger("request_elapsed_ms", elapsed.InMilliseconds()); 51 beacon_value->SetInteger("request_elapsed_ms", elapsed.InMilliseconds());
49 base::TimeDelta request_age = upload_time - start_time; 52 base::TimeDelta request_age = upload_time - start_time;
50 beacon_value->SetInteger("request_age_ms", request_age.InMilliseconds()); 53 beacon_value->SetInteger("request_age_ms", request_age.InMilliseconds());
51 bool network_changed = last_network_change_time > start_time; 54 bool network_changed = last_network_change_time > start_time;
52 beacon_value->SetBoolean("network_changed", network_changed); 55 beacon_value->SetBoolean("network_changed", network_changed);
53 beacon_value->SetDouble("sample_rate", sample_rate); 56 beacon_value->SetDouble("sample_rate", sample_rate);
54 return std::move(beacon_value); 57 return std::move(beacon_value);
55 } 58 }
56 59
57 } // namespace domain_reliability 60 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « no previous file | components/domain_reliability/context.cc » ('j') | components/domain_reliability/context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698