Index: components/cronet/android/metrics_util.h |
diff --git a/components/cronet/android/metrics_util.h b/components/cronet/android/metrics_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..aa6a9a4173d8e0beba70e3bb9c9f16b16604ac2e |
--- /dev/null |
+++ b/components/cronet/android/metrics_util.h |
@@ -0,0 +1,25 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_CRONET_ANDROID_CRONET_METRICS_UTIL_H_ |
+#define COMPONENTS_CRONET_ANDROID_CRONET_METRICS_UTIL_H_ |
+ |
+#include <stdint.h> |
+ |
+#include "base/time/time.h" |
+ |
+namespace cronet { |
+ |
+class MetricsUtil { |
mgersh
2016/10/05 19:36:47
This should be a namespace instead of a class: htt
xunjieli
2016/10/06 03:51:47
Done. Good to know!
|
+ public: |
+ // Converts timing metrics stored as TimeTicks into the format expected by the |
+ // Java layer: ms since Unix epoch, or -1 for null |
+ static int64_t ConvertTime(const base::TimeTicks& ticks, |
+ const base::TimeTicks& start_ticks, |
+ const base::Time& start_time); |
+}; |
+ |
+} // namespace cronet |
+ |
+#endif // COMPONENTS_CRONET_ANDROID_CRONET_METRICS_UTIL_H_ |