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

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

Issue 252613002: Domain Reliability: More security review. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 7 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 "base/values.h" 7 #include "base/values.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 9
10 namespace domain_reliability { 10 namespace domain_reliability {
(...skipping 13 matching lines...) Expand all
24 net::ErrorToString(chrome_error)); 24 net::ErrorToString(chrome_error));
25 beacon_value->Set("failure_data", failure_value); 25 beacon_value->Set("failure_data", failure_value);
26 } 26 }
27 beacon_value->SetString("server_ip", server_ip); 27 beacon_value->SetString("server_ip", server_ip);
28 if (http_response_code >= 0) 28 if (http_response_code >= 0)
29 beacon_value->SetInteger("http_response_code", http_response_code); 29 beacon_value->SetInteger("http_response_code", http_response_code);
30 beacon_value->SetInteger("request_elapsed_ms", 30 beacon_value->SetInteger("request_elapsed_ms",
31 elapsed.InMilliseconds()); 31 elapsed.InMilliseconds());
32 beacon_value->SetInteger("request_age_ms", 32 beacon_value->SetInteger("request_age_ms",
33 (upload_time - start_time).InMilliseconds()); 33 (upload_time - start_time).InMilliseconds());
34 // TODO(ttuttle): Implement protocol and dns_resolver_ip[s] fields.
35
36 return beacon_value; 34 return beacon_value;
37 } 35 }
38 36
39 } // namespace domain_reliability 37 } // namespace domain_reliability
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698