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

Unified Diff: components/cronet/android/metrics_util.h

Issue 2360813003: [Cronet] Pass metrics information from C++ BidirectionalStream to Java (Closed)
Patch Set: self review Created 4 years, 2 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
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_

Powered by Google App Engine
This is Rietveld 408576698