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

Unified Diff: ash/system/session_length_limit/tray_session_length_limit.cc

Issue 11586010: Fix the color of the session length countdown timer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/session_length_limit/tray_session_length_limit.cc
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 0b6abb4d43bb63a6fc6a27faf79bd7bf77b93383..ca3851929a2d339f5b3e28ee3c891103ba278774 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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698