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

Unified Diff: chrome/common/startup_metric_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; remove unnecessary change to AwShellApplication.java 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
Index: chrome/common/startup_metric_utils.cc
diff --git a/chrome/common/startup_metric_utils.cc b/chrome/common/startup_metric_utils.cc
index 3d576e9f402820dd0adfe68f4d0f2a5f7da9ce58..bd57854c4f83768081ff51a7f07855f2b602913b 100644
--- a/chrome/common/startup_metric_utils.cc
+++ b/chrome/common/startup_metric_utils.cc
@@ -19,7 +19,7 @@ namespace {
// Note that at the time of this writing, access is only on the UI thread.
volatile bool g_non_browser_ui_displayed = false;
-const base::Time* MainEntryPointTimeInternal() {
+base::Time* MainEntryPointTimeInternal() {
static base::Time main_start_time = base::Time::Now();
return &main_start_time;
}
@@ -56,7 +56,13 @@ void SetNonBrowserUIDisplayed() {
void RecordMainEntryPointTime() {
DCHECK(!g_main_entry_time_was_recorded);
g_main_entry_time_was_recorded = true;
- MainEntryPointTimeInternal();
+ *MainEntryPointTimeInternal() = base::Time::Now();
jeremy 2013/08/27 19:18:51 Sorry, I don't understand this change?
aberent 2013/08/28 15:53:05 Done. You are right, it isn't needed.
+}
+
+void RecordSavedMainEntryPointTime(const base::Time& entry_point_time) {
jeremy 2013/08/27 19:18:51 Again #if defined(OS_ANDROID)
aberent 2013/08/28 15:53:05 Done.
+ DCHECK(!g_main_entry_time_was_recorded);
+ g_main_entry_time_was_recorded = true;
+ *MainEntryPointTimeInternal() = entry_point_time;
}
// Return the time recorded by RecordMainEntryPointTime().
« chrome/common/startup_metric_utils.h ('K') | « chrome/common/startup_metric_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698