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

Unified Diff: components/domain_reliability/util.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/domain_reliability/uploader_unittest.cc ('k') | components/domain_reliability/util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/domain_reliability/util.h
diff --git a/components/domain_reliability/util.h b/components/domain_reliability/util.h
index 85c68aadd1b070a35c82ea212026cfadf0ba5053..9f4961857d1aa0a4006e84518c3e4475af28c9e3 100644
--- a/components/domain_reliability/util.h
+++ b/components/domain_reliability/util.h
@@ -15,18 +15,20 @@
namespace domain_reliability {
-class DOMAIN_RELIABILITY_EXPORT DomainReliabilityUtil {
- public:
- // Attempts to convert a net error and an HTTP response code into the status
- // string that should be recorded in a beacon. Returns true if it could.
- static bool GetBeaconStatus(
- int net_error,
- int http_response_code,
- std::string* beacon_status_out);
-};
+// Attempts to convert a net error and an HTTP response code into the status
+// string that should be recorded in a beacon. Returns true if it could.
+//
+// N.B.: This functions as the whitelist of "safe" errors to report; network-
+// local errors are purposefully not converted to avoid revealing
+// information about the local network to the remote server.
+bool GetDomainReliabilityBeaconStatus(
+ int net_error,
+ int http_response_code,
+ std::string* beacon_status_out);
// Mockable wrapper around TimeTicks::Now and Timer. Mock version is in
// test_util.h.
+// TODO(ttuttle): Rename to Time{Provider,Source,?}.
class DOMAIN_RELIABILITY_EXPORT MockableTime {
public:
// Mockable wrapper around (a subset of) base::Timer.
@@ -65,6 +67,7 @@ class DOMAIN_RELIABILITY_EXPORT MockableTime {
class DOMAIN_RELIABILITY_EXPORT ActualTime : public MockableTime {
public:
ActualTime();
+
virtual ~ActualTime();
// MockableTime implementation:
« no previous file with comments | « components/domain_reliability/uploader_unittest.cc ('k') | components/domain_reliability/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698