| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/time_format.h" | 5 #include "chrome/common/time_format.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/stl_util-inl.h" | 12 #include "base/stl_util.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "unicode/datefmt.h" | 18 #include "unicode/datefmt.h" |
| 19 #include "unicode/locid.h" | 19 #include "unicode/locid.h" |
| 20 #include "unicode/plurfmt.h" | 20 #include "unicode/plurfmt.h" |
| 21 #include "unicode/plurrule.h" | 21 #include "unicode/plurrule.h" |
| 22 #include "unicode/smpdtfmt.h" | 22 #include "unicode/smpdtfmt.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 328 |
| 329 // Filter out "today" and "yesterday" | 329 // Filter out "today" and "yesterday" |
| 330 if (time >= midnight_today) | 330 if (time >= midnight_today) |
| 331 return l10n_util::GetStringUTF16(IDS_PAST_TIME_TODAY); | 331 return l10n_util::GetStringUTF16(IDS_PAST_TIME_TODAY); |
| 332 else if (time >= midnight_today - | 332 else if (time >= midnight_today - |
| 333 TimeDelta::FromMicroseconds(Time::kMicrosecondsPerDay)) | 333 TimeDelta::FromMicroseconds(Time::kMicrosecondsPerDay)) |
| 334 return l10n_util::GetStringUTF16(IDS_PAST_TIME_YESTERDAY); | 334 return l10n_util::GetStringUTF16(IDS_PAST_TIME_YESTERDAY); |
| 335 | 335 |
| 336 return string16(); | 336 return string16(); |
| 337 } | 337 } |
| OLD | NEW |