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

Unified Diff: chrome/browser/android/uma_utils.cc

Issue 23443009: [Android] Support startup histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Android] Support startup histogram - fix missing copyright notice Created 7 years, 4 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
« no previous file with comments | « chrome/browser/android/uma_utils.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/uma_utils.cc
diff --git a/chrome/browser/android/uma_utils.cc b/chrome/browser/android/uma_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0e9152ddbe88d7ef87af012af6becac23d4b38e7
--- /dev/null
+++ b/chrome/browser/android/uma_utils.cc
@@ -0,0 +1,24 @@
+// 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/browser/android/uma_utils.h"
+
+#include "jni/UmaUtils_jni.h"
+
+namespace chrome {
+namespace android {
+
+base::Time GetMainEntryPointTime() {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ int64 startTimeUnixMs = Java_UmaUtils_getMainEntryPointTime(env);
+ return base::Time::UnixEpoch() +
+ base::TimeDelta::FromMilliseconds(startTimeUnixMs);
+}
+
+bool RegisterStartupMetricUtils(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+} // namespace android
+} // namespace chrome
« no previous file with comments | « chrome/browser/android/uma_utils.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698