summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/boot_times_loader.cc
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-18 18:32:45 +0000
committerBen Murdoch <benm@google.com>2010-11-18 18:38:07 +0000
commit513209b27ff55e2841eac0e4120199c23acce758 (patch)
treeaeba30bb08c5f47c57003544e378a377c297eee6 /chrome/browser/chromeos/boot_times_loader.cc
parent164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff)
downloadexternal_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'chrome/browser/chromeos/boot_times_loader.cc')
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index 00151b8..5fc7414 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -17,6 +17,7 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/thread.h"
+#include "base/thread_restrictions.h"
#include "base/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_thread.h"
@@ -222,7 +223,7 @@ static void RecordStatsDelayed(
void BootTimesLoader::WriteLoginTimes(
const std::vector<TimeMarker> login_times) {
const int kMinTimeMillis = 1;
- const int kMaxTimeMillis = 30;
+ const int kMaxTimeMillis = 30000;
const int kNumBuckets = 100;
const char kUmaPrefix[] = "BootTime.";
const FilePath log_path(kLogPath);
@@ -281,7 +282,7 @@ BootTimesLoader::Stats BootTimesLoader::GetCurrentStats() {
const FilePath kProcUptime("/proc/uptime");
const FilePath kDiskStat("/sys/block/sda/stat");
Stats stats;
-
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
file_util::ReadFileToString(kProcUptime, &stats.uptime);
file_util::ReadFileToString(kDiskStat, &stats.disk);
return stats;
@@ -334,7 +335,7 @@ void BootTimesLoader::Observe(
// and the page is reloaded.
if (NetworkStateNotifier::Get()->is_connected()) {
// Post difference between first tab and login success time.
- AddLoginTimeMarker("LoginDone", false);
+ AddLoginTimeMarker("LoginDone", true);
RecordCurrentStats(kChromeFirstRender);
// Post chrome first render stat.
registrar_.Remove(this, NotificationType::LOAD_START,