summaryrefslogtreecommitdiffstats
path: root/ash/system/session_length_limit
diff options
context:
space:
mode:
authorbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-17 12:37:43 +0000
committerbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-17 12:37:43 +0000
commit44f5ff8d9c3c572f7a0601d6892ce469da1c158a (patch)
tree0a1a5af97e0bedcb878945c0801a2fc4f252b1c1 /ash/system/session_length_limit
parent7b2cf54d9620fb1a9e8516e23de2e83ff57082ef (diff)
downloadchromium_src-44f5ff8d9c3c572f7a0601d6892ce469da1c158a.zip
chromium_src-44f5ff8d9c3c572f7a0601d6892ce469da1c158a.tar.gz
chromium_src-44f5ff8d9c3c572f7a0601d6892ce469da1c158a.tar.bz2
Fix the color of the session length countdown timer
This CL fixes the color of the session length countdown timer. The timer should only be red when the remaining time reaches 5 minutes. BUG=chromium-os:26957 TEST=Manual TBR=stevenjb@chromium.org Review URL: https://chromiumcodereview.appspot.com/11586010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/session_length_limit')
-rw-r--r--ash/system/session_length_limit/tray_session_length_limit.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ash/system/session_length_limit/tray_session_length_limit.cc b/ash/system/session_length_limit/tray_session_length_limit.cc
index 0b6abb4..ca38519 100644
--- a/ash/system/session_length_limit/tray_session_length_limit.cc
+++ b/ash/system/session_length_limit/tray_session_length_limit.cc
@@ -208,6 +208,8 @@ void RemainingSessionTimeTrayView::UpdateText() {
int seconds = floor(
(limit_ - (base::Time::Now() - session_start_time_)).InSecondsF() + .5);
seconds = std::min(std::max(seconds, 0), 99 * 60 * 60);
+ const SkColor color = seconds < kRemainingTimeWarningThresholdInSeconds ?
+ kRemainingTimeWarningColor : kRemainingTimeColor;
int minutes = seconds / 60;
seconds %= 60;
const int hours = minutes / 60;
@@ -216,8 +218,6 @@ void RemainingSessionTimeTrayView::UpdateText() {
const string16 hours_str = IntToTwoDigitString(hours);
const string16 minutes_str = IntToTwoDigitString(minutes);
const string16 seconds_str = IntToTwoDigitString(seconds);
- const SkColor color = seconds < kRemainingTimeWarningThresholdInSeconds ?
- kRemainingTimeWarningColor : kRemainingTimeColor;
if (horizontal_layout_label_) {
horizontal_layout_label_->SetText(l10n_util::GetStringFUTF16(