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

Side by Side Diff: components/cronet/android/metrics_util.cc

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/cronet/android/metrics_util.h"
6
7 #include "base/logging.h"
8
9 namespace cronet {
10
11 int64_t MetricsUtil::ConvertTime(const base::TimeTicks& ticks,
12 const base::TimeTicks& start_ticks,
13 const base::Time& start_time) {
14 if (ticks.is_null() || start_ticks.is_null()) {
15 return -1;
16 }
17 DCHECK(!start_time.is_null());
18 return (start_time + (ticks - start_ticks)).ToJavaTime();
19 }
20
21 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698