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

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

Issue 2360813003: [Cronet] Pass metrics information from C++ BidirectionalStream to Java (Closed)
Patch Set: Rebased 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..89d2d73c826c1260d699fa3aade748930c4bfc70
--- /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 {
+
+namespace metrics_util {
+
+// Converts timing metrics stored as TimeTicks into the format expected by the
+// Java layer: ms since Unix epoch, or -1 for null
+int64_t ConvertTime(const base::TimeTicks& ticks,
+ const base::TimeTicks& start_ticks,
+ const base::Time& start_time);
+} // namespace metrics_util
+
+} // namespace cronet
+
+#endif // COMPONENTS_CRONET_ANDROID_CRONET_METRICS_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698