| 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 24 matching lines...) Expand all Loading... |
| 35 beacon_value->SetString("server_ip", server_ip); | 35 beacon_value->SetString("server_ip", server_ip); |
| 36 beacon_value->SetBoolean("was_proxied", was_proxied); | 36 beacon_value->SetBoolean("was_proxied", was_proxied); |
| 37 beacon_value->SetString("protocol", protocol); | 37 beacon_value->SetString("protocol", protocol); |
| 38 if (http_response_code >= 0) | 38 if (http_response_code >= 0) |
| 39 beacon_value->SetInteger("http_response_code", http_response_code); | 39 beacon_value->SetInteger("http_response_code", http_response_code); |
| 40 beacon_value->SetInteger("request_elapsed_ms", elapsed.InMilliseconds()); | 40 beacon_value->SetInteger("request_elapsed_ms", elapsed.InMilliseconds()); |
| 41 base::TimeDelta request_age = upload_time - start_time; | 41 base::TimeDelta request_age = upload_time - start_time; |
| 42 beacon_value->SetInteger("request_age_ms", request_age.InMilliseconds()); | 42 beacon_value->SetInteger("request_age_ms", request_age.InMilliseconds()); |
| 43 bool network_changed = last_network_change_time > start_time; | 43 bool network_changed = last_network_change_time > start_time; |
| 44 beacon_value->SetBoolean("network_changed", network_changed); | 44 beacon_value->SetBoolean("network_changed", network_changed); |
| 45 beacon_value->SetInteger("weight", weight); |
| 45 return beacon_value.Pass(); | 46 return beacon_value.Pass(); |
| 46 } | 47 } |
| 47 | 48 |
| 48 } // namespace domain_reliability | 49 } // namespace domain_reliability |
| OLD | NEW |