Index: ash/system/date/date_view.cc |
diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc |
index f303f73a37c383c77e9f948ceead97c2edb9ebfb..97669f17b7c735c21700674b9dc13f51c70616aa 100644 |
--- a/ash/system/date/date_view.cc |
+++ b/ash/system/date/date_view.cc |
@@ -60,10 +60,16 @@ BaseDateTimeView::~BaseDateTimeView() { |
void BaseDateTimeView::UpdateText() { |
base::Time now = base::Time::Now(); |
- gfx::Size old_size = GetPreferredSize(); |
UpdateTextInternal(now); |
SchedulePaint(); |
+ SetTimer(now); |
+} |
+ |
+BaseDateTimeView::BaseDateTimeView() { |
+ SetTimer(base::Time::Now()); |
+} |
+void BaseDateTimeView::SetTimer(const base::Time& now) { |
// Try to set the timer to go off at the next change of the minute. We don't |
// want to have the timer go off more than necessary since that will cause |
// the CPU to wake up and consume power. |
@@ -86,9 +92,6 @@ void BaseDateTimeView::UpdateText() { |
this, &BaseDateTimeView::UpdateText); |
} |
-BaseDateTimeView::BaseDateTimeView() { |
-} |
- |
void BaseDateTimeView::ChildPreferredSizeChanged(views::View* child) { |
views::View::PreferredSizeChanged(); |
if (GetWidget()) |