summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main_posix.cc
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-22 03:25:35 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-22 03:25:35 +0000
commit6a2a61d68c4011a6ff4697dc636b8e84f296d9fa (patch)
treecd704b26fb6089fa73a662cefab130c584c5df39 /chrome/browser/browser_main_posix.cc
parent23f919a74a2deedf4e49391f60ff2c36d9710c54 (diff)
downloadchromium_src-6a2a61d68c4011a6ff4697dc636b8e84f296d9fa.zip
chromium_src-6a2a61d68c4011a6ff4697dc636b8e84f296d9fa.tar.gz
chromium_src-6a2a61d68c4011a6ff4697dc636b8e84f296d9fa.tar.bz2
Record logout time stats for Chrome OS.
Record lougout time stats and dump it to /tmp/logout-times-sent. ShutdownTime.Logout, ShutdownTime.UIMessageLoopEnded, and ShutdownTime.BrowserDeleted will be sent to UMA, as well. % cat /tmp/logout-times-sent ShutdownTime.Logout: 0.39 0.00 +0.00 LogoutStarted 0.00 +0.00 ShutdownDetected 0.02 +0.02 StartedClosingWindows 0.27 +0.25 UIMessageLoopEnded 0.27 +0.00 BrowserShutdownStarted 0.39 +0.12 BrowserDeleted 0.39 +0.00 BrowserMainEnded Along the way, change BootTimesLoader to append data to existing /tmp/uptime-* files just like /sbin/bootstat does, so we can collect numbers from 2nd login as well. BUG=chromium-os:6847 TEST=confirmed that /tmp/login-times-sent and /tmp/logout-times-sent are written properly. Review URL: http://codereview.chromium.org/4973002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main_posix.cc')
-rw-r--r--chrome/browser/browser_main_posix.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/browser_main_posix.cc b/chrome/browser/browser_main_posix.cc
index 9736c66..4659a34 100644
--- a/chrome/browser/browser_main_posix.cc
+++ b/chrome/browser/browser_main_posix.cc
@@ -16,6 +16,10 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/common/chrome_switches.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/boot_times_loader.h"
+#endif
+
namespace {
// See comment in |PreEarlyInitialization()|, where sigaction is called.
@@ -109,6 +113,10 @@ void ShutdownDetector::ThreadMain() {
} while (bytes_read < sizeof(signal));
VLOG(1) << "Handling shutdown for signal " << signal << ".";
+#if defined(OS_CHROMEOS)
+ chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("ShutdownDetected",
+ false);
+#endif
if (!BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,