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/beacon.h" | 5 #include "components/domain_reliability/beacon.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "components/domain_reliability/util.h" | 8 #include "components/domain_reliability/util.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 beacon_value->SetString("protocol", protocol); | 37 beacon_value->SetString("protocol", protocol); |
38 if (details.quic_broken) | 38 if (details.quic_broken) |
39 beacon_value->SetBoolean("quic_broken", details.quic_broken); | 39 beacon_value->SetBoolean("quic_broken", details.quic_broken); |
40 if (http_response_code >= 0) | 40 if (http_response_code >= 0) |
41 beacon_value->SetInteger("http_response_code", http_response_code); | 41 beacon_value->SetInteger("http_response_code", http_response_code); |
42 beacon_value->SetInteger("request_elapsed_ms", elapsed.InMilliseconds()); | 42 beacon_value->SetInteger("request_elapsed_ms", elapsed.InMilliseconds()); |
43 base::TimeDelta request_age = upload_time - start_time; | 43 base::TimeDelta request_age = upload_time - start_time; |
44 beacon_value->SetInteger("request_age_ms", request_age.InMilliseconds()); | 44 beacon_value->SetInteger("request_age_ms", request_age.InMilliseconds()); |
45 bool network_changed = last_network_change_time > start_time; | 45 bool network_changed = last_network_change_time > start_time; |
46 beacon_value->SetBoolean("network_changed", network_changed); | 46 beacon_value->SetBoolean("network_changed", network_changed); |
| 47 beacon_value->SetDouble("sample_rate", sample_rate); |
47 return beacon_value.Pass(); | 48 return beacon_value.Pass(); |
48 } | 49 } |
49 | 50 |
50 } // namespace domain_reliability | 51 } // namespace domain_reliability |
OLD | NEW |