diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-12 03:32:53 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-12 03:32:53 +0000 |
commit | 328c1ef7431f09790e1cec1744cf43110c36dfe8 (patch) | |
tree | 6f067d268cd4b41e2a1dc0c2d1ba2195d79f35b1 /chrome/common/time_format.h | |
parent | b2dcd7878191552418fad77cb2402fbf5597f1ae (diff) | |
download | chromium_src-328c1ef7431f09790e1cec1744cf43110c36dfe8.zip chromium_src-328c1ef7431f09790e1cec1744cf43110c36dfe8.tar.gz chromium_src-328c1ef7431f09790e1cec1744cf43110c36dfe8.tar.bz2 |
Convert TimeFormat (chrome/common/time_format.*) to string16 (from wstring).
(Also do some drive-bys.)
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3165009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55842 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/time_format.h')
-rw-r--r-- | chrome/common/time_format.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/common/time_format.h b/chrome/common/time_format.h index 6045cef..86c80b2 100644 --- a/chrome/common/time_format.h +++ b/chrome/common/time_format.h @@ -1,4 +1,4 @@ -// 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. @@ -8,7 +8,7 @@ // This file defines methods to format time values as strings. -#include <string> +#include "base/string16.h" #include "unicode/smpdtfmt.h" @@ -25,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. @@ -46,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__ |