| Index: chrome/browser/chromeos/login/background_view.cc
|
| diff --git a/chrome/browser/chromeos/login/background_view.cc b/chrome/browser/chromeos/login/background_view.cc
|
| index 6e4e54a2b744667296fd4f9dc3faf849bb008475..e57c4d75c510fdf2590c2aa0970af91878a71f7d 100644
|
| --- a/chrome/browser/chromeos/login/background_view.cc
|
| +++ b/chrome/browser/chromeos/login/background_view.cc
|
| @@ -198,14 +198,31 @@ void BackgroundView::OnBootTimes(
|
| BootTimesLoader::Handle handle, BootTimesLoader::BootTimes boot_times) {
|
| // TODO(davemoore) if we decide to keep these times visible we will need
|
| // to localize the strings.
|
| - std::string boot_times_text =
|
| - StringPrintf(
|
| - "Boot took %.2f seconds "
|
| - "(firmware %.2fs, kernel %.2fs, user %.2fs)",
|
| - boot_times.firmware + boot_times.login_prompt_ready,
|
| - boot_times.firmware,
|
| - boot_times.pre_startup,
|
| - boot_times.login_prompt_ready - boot_times.pre_startup);
|
| + const char* kBootTimesNoChromeExec =
|
| + "Boot took %.2f seconds (firmware %.2fs, kernel %.2fs, system %.2fs)";
|
| + const char* kBootTimesChromeExec =
|
| + "Boot took %.2f seconds "
|
| + "(firmware %.2fs, kernel %.2fs, system %.2fs, chrome %.2fs)";
|
| + std::string boot_times_text;
|
| +
|
| + if (boot_times.chrome_exec > 0) {
|
| + boot_times_text =
|
| + StringPrintf(
|
| + kBootTimesChromeExec,
|
| + boot_times.firmware + boot_times.login_prompt_ready,
|
| + boot_times.firmware,
|
| + boot_times.pre_startup,
|
| + boot_times.chrome_exec - boot_times.pre_startup,
|
| + boot_times.login_prompt_ready - boot_times.chrome_exec);
|
| + } else {
|
| + boot_times_text =
|
| + StringPrintf(
|
| + kBootTimesNoChromeExec,
|
| + boot_times.firmware + boot_times.login_prompt_ready,
|
| + boot_times.firmware,
|
| + boot_times.pre_startup,
|
| + boot_times.login_prompt_ready - boot_times.pre_startup);
|
| + }
|
| boot_times_label_->SetText(ASCIIToWide(boot_times_text));
|
| }
|
|
|
|
|