summaryrefslogtreecommitdiffstats
path: root/chrome/common/time_format.h
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-10-19 14:37:37 +0100
committerIain Merrick <husky@google.com>2010-10-19 14:37:37 +0100
commit3345a6884c488ff3a535c2c9acdd33d74b37e311 (patch)
tree7784b988ef1698cb6967ea1bdf07616237716c6c /chrome/common/time_format.h
parentefc8475837ec58186051f23bb03542620424f6ce (diff)
downloadexternal_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.zip
external_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.tar.gz
external_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.tar.bz2
Merge Chromium at 7.0.540.0 : Initial merge by git
Not including third_party/icu as it contains huge data files that break Gerrit, and aren't actually used. Change-Id: I428a386e70f3b58cacd28677b8cfda282e891e15
Diffstat (limited to 'chrome/common/time_format.h')
-rw-r--r--chrome/common/time_format.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/common/time_format.h b/chrome/common/time_format.h
index c04ed62..86c80b2 100644
--- a/chrome/common/time_format.h
+++ b/chrome/common/time_format.h
@@ -1,13 +1,14 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_COMMON_TIME_FORMAT_H__
#define CHROME_COMMON_TIME_FORMAT_H__
+#pragma once
// This file defines methods to format time values as strings.
-#include <string>
+#include "base/string16.h"
#include "unicode/smpdtfmt.h"
@@ -24,13 +25,13 @@ class TimeFormat {
// in-progress operations and users have different expectations of units.
// Returns times in elapsed-format: "3 mins ago", "2 days ago".
- static std::wstring TimeElapsed(const base::TimeDelta& delta);
+ static string16 TimeElapsed(const base::TimeDelta& delta);
// Returns times in remaining-format: "3 mins left", "2 days left".
- static std::wstring TimeRemaining(const base::TimeDelta& delta);
+ static string16 TimeRemaining(const base::TimeDelta& delta);
// Returns times in short-format: "3 mins", "2 days".
- static std::wstring TimeRemainingShort(const base::TimeDelta& delta);
+ static string16 TimeRemainingShort(const base::TimeDelta& delta);
// For displaying a relative time in the past. This method returns either
// "Today", "Yesterday", or an empty string if it's older than that.
@@ -45,8 +46,8 @@ class TimeFormat {
// If NULL, the current day's midnight will be retrieved, which can be
// slow. If many items are being processed, it is best to get the current
// time once at the beginning and pass it for each computation.
- static std::wstring RelativeDate(const base::Time& time,
- const base::Time* optional_midnight_today);
+ static string16 RelativeDate(const base::Time& time,
+ const base::Time* optional_midnight_today);
};
#endif // CHROME_COMMON_TIME_FORMAT_H__