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

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

Issue 1497803004: Domain Reliability: Add sample_rate field to Beacon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ...actually make sample_rate a double :P Created 5 years 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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698