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

Unified Diff: chrome/browser/ui/app_list/app_list_service.cc

Issue 68173019: Remove static initializer from AppListView::SetNextPaintCallback(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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/browser/ui/app_list/app_list_service.cc
diff --git a/chrome/browser/ui/app_list/app_list_service.cc b/chrome/browser/ui/app_list/app_list_service.cc
index 7d686ef3b20be9485802ce1389a1d37b86b14d63..d7ca39510ee6cfd9cdd0df13779ffeeeda285f81 100644
--- a/chrome/browser/ui/app_list/app_list_service.cc
+++ b/chrome/browser/ui/app_list/app_list_service.cc
@@ -50,10 +50,18 @@ StartupType GetStartupType(const CommandLine& command_line) {
return COLD_START;
}
-void RecordFirstPaintTiming(StartupType startup_type,
- const base::Time& start_time) {
+int64 g_startup_time;
+StartupType g_startup_type;
+
+void RecordStartupInfo(StartupType startup_type, const base::Time& start_time) {
benwells 2013/11/15 02:13:59 What calls this?
koz (OOO until 15th September) 2013/11/17 23:16:19 Oops, it's meant to be called below when we set th
+ g_startup_time = start_time.ToInternalValue();
+ g_startup_type = startup_type;
+}
+
+void RecordFirstPaintTiming() {
+ base::Time start_time(base::Time::FromInternalValue(g_startup_type));
base::TimeDelta elapsed = base::Time::Now() - start_time;
- switch (startup_type) {
+ switch (g_startup_type) {
case COLD_START:
UMA_HISTOGRAM_LONG_TIMES("Startup.AppListFirstPaintColdStart", elapsed);
break;
@@ -111,5 +119,5 @@ void AppListService::RecordShowTimings(const CommandLine& command_line) {
}
Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->SetAppListNextPaintCallback(
- base::Bind(RecordFirstPaintTiming, startup, start_time));
+ RecordFirstPaintTiming);
}

Powered by Google App Engine
This is Rietveld 408576698