OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 "chrome/common/android/startup_metric_utils_android.h" |
| 6 |
| 7 #include "chrome/common/startup_metric_utils.h" |
| 8 |
| 9 #include "jni/StartupMetricUtils_jni.h" |
| 10 |
| 11 namespace chrome { |
| 12 namespace android { |
| 13 |
| 14 base::Time GetMainEntryPointTime() { |
| 15 JNIEnv* env = base::android::AttachCurrentThread(); |
| 16 int64 startTimeUnixMs = Java_StartupMetricUtils_getMainEntryPointTime(env); |
| 17 return base::Time::UnixEpoch() + |
| 18 base::TimeDelta::FromMilliseconds(startTimeUnixMs); |
| 19 } |
| 20 |
| 21 bool RegisterStartupMetricUtils(JNIEnv* env) { |
| 22 return RegisterNativesImpl(env); |
| 23 } |
| 24 |
| 25 } // namespace android |
| 26 } // namespace chrome |
OLD | NEW |