| Index: chrome/common/android/startup_metric_utils_android.cc
|
| diff --git a/chrome/common/android/startup_metric_utils_android.cc b/chrome/common/android/startup_metric_utils_android.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..811147807232a8844c0e1fcd2eed19cd18aec4cf
|
| --- /dev/null
|
| +++ b/chrome/common/android/startup_metric_utils_android.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2013 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.
|
| +
|
| +#include "chrome/common/android/startup_metric_utils_android.h"
|
| +
|
| +#include "chrome/common/startup_metric_utils.h"
|
| +
|
| +#include "jni/StartupMetricUtils_jni.h"
|
| +
|
| +namespace chrome {
|
| +namespace android {
|
| +
|
| +base::Time GetMainEntryPointTime() {
|
| + JNIEnv* env = base::android::AttachCurrentThread();
|
| + int64 startTimeUnixMs = Java_StartupMetricUtils_getMainEntryPointTime(env);
|
| + return base::Time::UnixEpoch() +
|
| + base::TimeDelta::FromMilliseconds(startTimeUnixMs);
|
| +}
|
| +
|
| +bool RegisterStartupMetricUtils(JNIEnv* env) {
|
| + return RegisterNativesImpl(env);
|
| +}
|
| +
|
| +} // namespace android
|
| +} // namespace chrome
|
|
|